diff --git a/src/segment-loader.js b/src/segment-loader.js index 78cf972f6..589749f0f 100644 --- a/src/segment-loader.js +++ b/src/segment-loader.js @@ -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; } } } diff --git a/test/loader-common.js b/test/loader-common.js index a6d5f33cc..552892544 100644 --- a/test/loader-common.js +++ b/test/loader-common.js @@ -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,