Skip to content

Commit

Permalink
Prevent gap jumping while seeking.
Browse files Browse the repository at this point in the history
Sometimes, when seeking backwards, the seek takes long enough for the playhead
to erroneously detect a gap and gap jump back to its previous position.
This only seems to happen when casting, presumably due to the additional
delay from message-passing.
This prevents gap jumps from happening while the video is seeking, and it should
solve the issue.

Closes #1061

Change-Id: I363c69428d84029a7808229c9c0e18eb691dd7f8
  • Loading branch information
theodab committed Oct 13, 2017
1 parent c6ddf59 commit 449cd3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/media/playhead.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ shaka.media.Playhead.prototype.onSeekingToStartTime_ = function() {
* @private
*/
shaka.media.Playhead.prototype.onPollGapJump_ = function() {
if (this.video_.readyState == 0)
if (this.video_.readyState == 0 || this.video_.seeking)
return;

// When the ready state changes, we have moved on, so we should fire the large
Expand Down

0 comments on commit 449cd3e

Please sign in to comment.