9c47ba5b by jrivera

Start 3 segments from the end of the playlist instead of 3 target durations

1 parent 58b7c472
......@@ -141,8 +141,7 @@
// https://tools.ietf.org/html/draft-pantos-http-live-streaming-16#section-6.3.3
start = intervalDuration(playlist, playlist.mediaSequence);
end = intervalDuration(playlist,
playlist.mediaSequence + playlist.segments.length);
end -= (playlist.targetDuration || DEFAULT_TARGET_DURATION) * 3;
playlist.mediaSequence + Math.max(0, playlist.segments.length - 3));
end = Math.max(0, end);
return videojs.createTimeRange(start, end);
};
......
......@@ -381,8 +381,8 @@
});
equal(seekable.start(0), 0, 'starts at the earliest available segment');
equal(seekable.end(0),
9 - (2 * 3),
'allows seeking no further than three target durations from the end');
9 - (2 + 2 + 1),
'allows seeking no further than three segments from the end');
});
})(window, window.videojs);
......