Skip to content

Commit

Permalink
gap-controller: put order in time diff computation right for initial gap
Browse files Browse the repository at this point in the history
  • Loading branch information
tchakabam authored and Rob Walch committed Nov 27, 2019
1 parent fd55674 commit ff0e43f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controller/gap-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class GapController {
// where some MSE implementation might not play when the playhead
// is exactly on the start value (trying to overcome what would be a browser bug).
const firstBufferedPosition = this.media.buffered.start(0);
if (mediaCurrentTime - firstBufferedPosition > 0 && !this.media.seeking) {
if ((firstBufferedPosition - mediaCurrentTime > 0) && !this.media.seeking) {
logger.warn(`skipping over gap at startup (first segment buffered time-range starts partially later than assumed) from ${mediaCurrentTime} to ${firstBufferedPosition} seconds`);
this.media.currentTime = firstBufferedPosition + SKIP_BUFFER_HOLE_STEP_SECONDS;
}
Expand Down

0 comments on commit ff0e43f

Please sign in to comment.