180f73e0 by Tom Johnson

Merge pull request #173 from videojs/hotfix/zero-duration

update for zero duration segment. fixes #172
2 parents b0e8c908 6e8d5532
......@@ -677,7 +677,7 @@ videojs.Hls.getPlaylistDuration = function(playlist, startIndex, endIndex) {
for (; i >= startIndex; i--) {
segment = playlist.segments[i];
dur += segment.duration || playlist.targetDuration || 0;
dur += (segment.duration !== undefined ? segment.duration : playlist.targetDuration) || 0;
}
return dur;
......