Skip to content

Commit

Permalink
revert changes in gap jumping controller
Browse files Browse the repository at this point in the history
  • Loading branch information
jobispo committed Jun 5, 2024
1 parent e27e66e commit 89832b3
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/media/gap_jumping_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ shaka.media.GapJumpingController = class {
/** @private {boolean} */
this.didFireLargeGap_ = false;

/** @private {number} */
this.lastJumpTimestamp_ = 0;

/**
* The stall detector tries to keep the playhead moving forward. It is
* managed by the gap-jumping controller to avoid conflicts. On some
Expand All @@ -77,10 +74,6 @@ shaka.media.GapJumpingController = class {
this.hadSegmentAppended_ = false;

this.eventManager_.listen(video, 'waiting', () => this.onPollGapJump_());
this.eventManager_.listen(video, 'playing',
() => {
this.lastJumpTimestamp_ = Date.now();
});

/**
* We can't trust |readyState| or 'waiting' events on all platforms. To make
Expand Down Expand Up @@ -150,10 +143,6 @@ shaka.media.GapJumpingController = class {
if (this.video_.readyState == 0) {
return;
}
// Don't gap jump if the last jump was too recent.
if (Date.now() - this.lastJumpTimestamp_ < 5000) {
return;
}
// Do not gap jump if seeking has begun, but the seeking event has not
// yet fired for this particular seek.
if (this.video_.seeking) {
Expand Down Expand Up @@ -252,7 +241,6 @@ shaka.media.GapJumpingController = class {
'Jumping forward', jumpSize, 'seconds because of gap starting at',
buffered.end(gapIndex - 1), 'and ending at', jumpTo);
}
this.lastJumpTimestamp_ = Date.now();
this.video_.currentTime = jumpTo;
}
}
Expand Down

0 comments on commit 89832b3

Please sign in to comment.