Skip to content

Commit 40a92b6

Browse files
committed
Don't use fudge factor for buffered ranges when seeking.
Chrome doesn't seem to support gap jumping immediately after a seek. So when we detect how much is buffered after a seek, we should use the exact ranges. Otherwise we will be left with a small gap that Chrome doesn't want to jump. Issue #655 Change-Id: I2d853e0c2b95285013463f38cece56ea9ea56133
1 parent 39183a1 commit 40a92b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/media/streaming_engine.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,11 @@ shaka.media.StreamingEngine.prototype.seeked = function() {
545545
continue;
546546
}
547547

548+
// Don't use a fudge factor here since Chrome doesn't jump gaps after a seek
549+
// https://github.com/google/shaka-player/issues/655
548550
var playheadTime = this.playhead_.getTime();
549551
var bufferedAhead = this.mediaSourceEngine_.bufferedAheadOf(
550-
type, playheadTime, 0.1);
552+
type, playheadTime);
551553
if (bufferedAhead > 0) {
552554
// The playhead has moved into a buffered region.
553555
shaka.log.debug(logPrefix,

0 commit comments

Comments
 (0)