update.duration was sometimes undefined
Removing the update.duration === Infinity check. We shouldn’t be getting so out of sync for static playlists anyway.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -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 | } | ... | ... |
-
Please register or sign in to post a comment