Skip to content

Commit

Permalink
use and expose the new max buffer low water line (#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsev authored Sep 30, 2020
1 parent db9fdc3 commit 77c996c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/master-playlist-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1708,8 +1708,9 @@ export class MasterPlaylistController extends videojs.EventTarget {
const initial = Config.BUFFER_LOW_WATER_LINE;
const rate = Config.BUFFER_LOW_WATER_LINE_RATE;
const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);
const newMax = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE_NEW);

return Math.min(initial + currentTime * rate, max);
return Math.min(initial + currentTime * rate, this.bufferWaterLineSelector ? newMax : max);
}

bufferHighWaterLine() {
Expand Down
1 change: 1 addition & 0 deletions src/videojs-http-streaming.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const Vhs = {
'GOAL_BUFFER_LENGTH_RATE',
'BUFFER_LOW_WATER_LINE',
'MAX_BUFFER_LOW_WATER_LINE',
'MAX_BUFFER_LOW_WATER_LINE_NEW',
'BUFFER_LOW_WATER_LINE_RATE',
'BANDWIDTH_VARIANCE'
].forEach((prop) => {
Expand Down

0 comments on commit 77c996c

Please sign in to comment.