Skip to content

Commit

Permalink
ie 11 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Mar 12, 2021
1 parent c2ebf7b commit a8957ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/segment-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,12 @@ export default class SegmentLoader extends videojs.EventTarget {
// unless parts fell off of the playlist for this segment.
// In that case we need to reset partIndex and resync
if (this.partIndex && (!segment.parts || !segment.parts.length || !segment.parts[this.partIndex])) {
const mediaIndex = this.mediaIndex;

this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`);
this.resetLoader();

this.mediaIndex = mediaIndex;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions test/loader-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@ export const LoaderCommonFactory = ({
});

QUnit.test('drops partIndex if playlist update drops parts', function(assert) {
assert.timeout(100000000000000000000);
return setupMediaSource(loader.mediaSource_, loader.sourceUpdater_).then(() => {
loader.playlist(playlistWithDuration(50, {
mediaSequence: 0,
Expand Down

0 comments on commit a8957ff

Please sign in to comment.