Merge pull request #173 from videojs/hotfix/zero-duration
update for zero duration segment. fixes #172
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -677,7 +677,7 @@ videojs.Hls.getPlaylistDuration = function(playlist, startIndex, endIndex) { | ... | @@ -677,7 +677,7 @@ videojs.Hls.getPlaylistDuration = function(playlist, startIndex, endIndex) { |
677 | 677 | ||
678 | for (; i >= startIndex; i--) { | 678 | for (; i >= startIndex; i--) { |
679 | segment = playlist.segments[i]; | 679 | segment = playlist.segments[i]; |
680 | dur += segment.duration || playlist.targetDuration || 0; | 680 | dur += (segment.duration !== undefined ? segment.duration : playlist.targetDuration) || 0; |
681 | } | 681 | } |
682 | 682 | ||
683 | return dur; | 683 | return dur; | ... | ... |
-
Please register or sign in to post a comment