Browse Source

ignore waterline when vod duration is less than waterline

abr/low-waterline
Matthew Neil 8 years ago
parent
commit
661478a3b8
  1. 9
      dist/videojs-contrib-hls.js
  2. 2
      dist/videojs-contrib-hls.min.js
  3. 8
      src/master-playlist-controller.js

9
dist/videojs-contrib-hls.js

@ -910,8 +910,13 @@ var MasterPlaylistController = (function (_videojs$EventTarget) {
// we want to switch down to lower resolutions quickly to continue playback, but
// ensure we have some buffer before we switch up to prevent us running out of
// buffer while loading a higher rendition
// If the playlist is live, then we want to not take low water line into account
if (!currentPlaylist.endList || nextPlaylist.attributes.BANDWIDTH < currentPlaylist.attributes.BANDWIDTH || forwardBuffer >= _config2['default'].BUFFER_LOW_WATER_LINE) {
// If the playlist is live, then we want to not take low water line into account.
// This is because in LIVE, the player plays 3 segments from the end of the
// playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble
// in those segments, a viewer will never experience a rendition upswitch.
// For the same reason as LIVE, we ignore the low waterline when the VOD duration
// is below the waterline
if (!currentPlaylist.endList || _this3.duration() < _config2['default'].BUFFER_LOW_WATER_LINE || nextPlaylist.attributes.BANDWIDTH < currentPlaylist.attributes.BANDWIDTH || forwardBuffer >= _config2['default'].BUFFER_LOW_WATER_LINE) {
_this3.masterPlaylistLoader_.media(nextPlaylist);
}

2
dist/videojs-contrib-hls.min.js
File diff suppressed because it is too large
View File

8
src/master-playlist-controller.js

@ -558,8 +558,14 @@ export class MasterPlaylistController extends videojs.EventTarget {
// we want to switch down to lower resolutions quickly to continue playback, but
// ensure we have some buffer before we switch up to prevent us running out of
// buffer while loading a higher rendition
// If the playlist is live, then we want to not take low water line into account
// If the playlist is live, then we want to not take low water line into account.
// This is because in LIVE, the player plays 3 segments from the end of the
// playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble
// in those segments, a viewer will never experience a rendition upswitch.
// For the same reason as LIVE, we ignore the low waterline when the VOD duration
// is below the waterline
if (!currentPlaylist.endList ||
this.duration() < Config.BUFFER_LOW_WATER_LINE ||
nextPlaylist.attributes.BANDWIDTH < currentPlaylist.attributes.BANDWIDTH ||
forwardBuffer >= Config.BUFFER_LOW_WATER_LINE) {
this.masterPlaylistLoader_.media(nextPlaylist);

Loading…
Cancel
Save