Skip to content

Commit

Permalink
Use a constant for segment ignore count in InsufficientBufferRule
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Jul 15, 2020
1 parent 96829b9 commit 3ad63aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/streaming/rules/abr/InsufficientBufferRule.js
Expand Up @@ -40,6 +40,7 @@ function InsufficientBufferRule(config) {

config = config || {};
const INSUFFICIENT_BUFFER_SAFETY_FACTOR = 0.5;
const SEGMENT_IGNORE_COUNT = 2;

const context = this.context;

Expand Down Expand Up @@ -118,8 +119,8 @@ function InsufficientBufferRule(config) {

function resetInitialSettings() {
bufferStateDict = {};
bufferStateDict[Constants.VIDEO] = {ignoreCount: 2};
bufferStateDict[Constants.AUDIO] = {ignoreCount: 2};
bufferStateDict[Constants.VIDEO] = {ignoreCount: SEGMENT_IGNORE_COUNT};
bufferStateDict[Constants.AUDIO] = {ignoreCount: SEGMENT_IGNORE_COUNT};
}

function onPlaybackSeeking() {
Expand Down

0 comments on commit 3ad63aa

Please sign in to comment.