diff --git a/src/master-playlist-controller.js b/src/master-playlist-controller.js index 6b14a8e21..352eb5bb1 100644 --- a/src/master-playlist-controller.js +++ b/src/master-playlist-controller.js @@ -933,6 +933,14 @@ export class MasterPlaylistController extends videojs.EventTarget { } } + let oldEnd; + let oldStart; + + if (this.seekable_ && this.seekable_.length) { + oldEnd = this.seekable_.end(0); + oldStart = this.seekable_.start(0); + } + if (!audioSeekable) { // seekable has been calculated based on buffering video data so it // can be returned directly @@ -950,6 +958,13 @@ export class MasterPlaylistController extends videojs.EventTarget { ]]); } + // seekable is the same as last time + if (this.seekable_ && this.seekable_.length) { + if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) { + return; + } + } + this.logger_(`seekable updated [${Ranges.printableRange(this.seekable_)}]`); this.tech_.trigger('seekablechanged');