Skip to content

Commit

Permalink
fix(FEC-9316): seek doesn't work before video finished loading (#87)
Browse files Browse the repository at this point in the history
occurred on DRM content only LOAD_DATA on SMART TV could take a moment and user can seek before - check if SEEKED event occurred before.
Couldn't resolve with LOADED_METADATA seek failed on earlier version of TV.
  • Loading branch information
Yuvalke committed Oct 24, 2019
1 parent 53e3135 commit c498d4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dash-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,10 @@ export default class DashAdapter extends BaseMediaSourceAdapter {
this._lastTimeDetach = NaN;
};
if (!isNaN(this._lastTimeDetach)) {
this._eventManager.listenOnce(this._videoElement, EventType.LOADED_DATA, () => _seekAfterDetach());
this._eventManager.listenOnce(this._videoElement, EventType.LOADED_DATA, _seekAfterDetach);
this._eventManager.listenOnce(this._videoElement, EventType.SEEKED, () =>
this._eventManager.unlisten(this._videoElement, EventType.LOADED_DATA, _seekAfterDetach)
);
}
}
}
Expand Down

0 comments on commit c498d4d

Please sign in to comment.