hls.js 1.6.0-beta.3.0.canary.10976 → 1.6.0-beta.3.0.canary.10979

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -83,7 +83,7 @@
83
83
  "@rollup/plugin-replace": "5.0.7",
84
84
  "@rollup/plugin-terser": "0.4.4",
85
85
  "@rollup/plugin-typescript": "11.1.6",
86
- "@svta/common-media-library": "0.8.0",
86
+ "@svta/common-media-library": "0.9.0",
87
87
  "@types/chai": "4.3.20",
88
88
  "@types/chart.js": "2.9.41",
89
89
  "@types/mocha": "10.0.10",
@@ -134,5 +134,5 @@
134
134
  "url-toolkit": "2.2.5",
135
135
  "wrangler": "3.109.2"
136
136
  },
137
- "version": "1.6.0-beta.3.0.canary.10976"
137
+ "version": "1.6.0-beta.3.0.canary.10979"
138
138
  }
@@ -952,13 +952,17 @@ class AbrController extends Logger implements AbrComponentAPI {
952
952
  }
953
953
 
954
954
  public set nextAutoLevel(nextLevel: number) {
955
- const { maxAutoLevel, minAutoLevel } = this.hls;
956
- const value = Math.min(Math.max(nextLevel, minAutoLevel), maxAutoLevel);
955
+ const value = this.deriveNextAutoLevel(nextLevel);
957
956
  if (this._nextAutoLevel !== value) {
958
957
  this.nextAutoLevelKey = '';
959
958
  this._nextAutoLevel = value;
960
959
  }
961
960
  }
961
+
962
+ protected deriveNextAutoLevel(nextLevel: number) {
963
+ const { maxAutoLevel, minAutoLevel } = this.hls;
964
+ return Math.min(Math.max(nextLevel, minAutoLevel), maxAutoLevel);
965
+ }
962
966
  }
963
967
 
964
968
  export default AbrController;