2fcc16f3 by Brandon Bay

update.duration was sometimes undefined

Removing the update.duration === Infinity check. We shouldn’t be
getting so out of sync for static playlists anyway.
1 parent 912e4f50
...@@ -820,7 +820,7 @@ videojs.Hls.translateMediaIndex = function(mediaIndex, original, update) { ...@@ -820,7 +820,7 @@ videojs.Hls.translateMediaIndex = function(mediaIndex, original, update) {
820 820
821 translatedMediaIndex = (mediaIndex + (original.mediaSequence - update.mediaSequence)); 821 translatedMediaIndex = (mediaIndex + (original.mediaSequence - update.mediaSequence));
822 822
823 if (update.duration === Infinity && translatedMediaIndex >= update.segments.length) { 823 if (translatedMediaIndex >= update.segments.length || translatedMediaIndex < 0) {
824 // recalculate the live point if the streams are too far out of sync 824 // recalculate the live point if the streams are too far out of sync
825 return videojs.Hls.setMediaIndexForLive(update) + 1; 825 return videojs.Hls.setMediaIndexForLive(update) + 1;
826 } 826 }
......