From 89832b350303cc6180406221e9edad6282b9bb18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Obispo?= Date: Wed, 5 Jun 2024 12:19:50 +0200 Subject: [PATCH] revert changes in gap jumping controller --- lib/media/gap_jumping_controller.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/media/gap_jumping_controller.js b/lib/media/gap_jumping_controller.js index 14ad5b687b..8c8bf1ef67 100644 --- a/lib/media/gap_jumping_controller.js +++ b/lib/media/gap_jumping_controller.js @@ -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 @@ -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 @@ -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) { @@ -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; } }