Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SivanA-Kaltura committed Jun 6, 2024
1 parent 5f1820b commit b2e2d18
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/dash-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -790,28 +790,28 @@ export default class DashAdapter extends BaseMediaSourceAdapter {
// called when a resource is downloaded
this.shaka!.getNetworkingEngine()?.registerResponseFilter((type, response) => {
switch (type) {
case shaka.net.NetworkingEngine.RequestType.SEGMENT:
this._trigger(EventType.FRAG_LOADED, {
miliSeconds: response.timeMs,
bytes: response.data.byteLength,
url: response.uri
});
if (this.isLive()) {
this._dispatchNativeEvent(EventType.DURATION_CHANGE);
}
break;
case shaka.net.NetworkingEngine.RequestType.MANIFEST:
this._parseManifest(response.data);
this._playbackActualUri = response.uri;
this._trigger(EventType.MANIFEST_LOADED, {miliSeconds: response.timeMs});
setTimeout(() => {
this._isLive = this._isLive || (this.shaka?.isLive() as boolean);
if (this._isLive && !this.shaka?.isLive() && !this._isStaticLive && this._config.switchDynamicToStatic) {
case shaka.net.NetworkingEngine.RequestType.SEGMENT:
this._trigger(EventType.FRAG_LOADED, {
miliSeconds: response.timeMs,
bytes: response.data.byteLength,
url: response.uri
});
if (this.isLive()) {
this._dispatchNativeEvent(EventType.DURATION_CHANGE);
}
break;
case shaka.net.NetworkingEngine.RequestType.MANIFEST:
this._parseManifest(response.data);
this._playbackActualUri = response.uri;
this._trigger(EventType.MANIFEST_LOADED, {miliSeconds: response.timeMs});
setTimeout(() => {
this._isLive = this._isLive || (this.shaka?.isLive() as boolean);
if (this._isLive && !this.shaka?.isLive() && !this._isStaticLive && this._config.switchDynamicToStatic) {
this._sourceObj!.url = response.uri;
this._switchFromDynamicToStatic();
}
});
break;
}
});
break;
}
});
}
Expand Down

0 comments on commit b2e2d18

Please sign in to comment.