diff --git a/docs/API.md b/docs/API.md index dbf7383873c..69cf1540902 100644 --- a/docs/API.md +++ b/docs/API.md @@ -908,9 +908,10 @@ var config = { Customized Adaptive Bitrate Streaming Controller. -Parameter should be a class providing a getter/setter and a `destroy()` method: +Parameter should be a class providing 2 getters, 2 setters and a `destroy()` method: - get/set `nextAutoLevel`: return next auto-quality level/force next auto-quality level that should be returned (currently used for emergency switch down) +- get/set `autoLevelCapping`: capping/max level value that could be used by ABR Controller - `destroy()`: should clean-up all used resources For `hls.bandwidthEstimate()` to return an estimate from your custom controller, it will also need to satisfy `abrController.bwEstimator.getEstimate()`. diff --git a/src/controller/abr-controller.ts b/src/controller/abr-controller.ts index 2ede60d8d58..402281de6be 100644 --- a/src/controller/abr-controller.ts +++ b/src/controller/abr-controller.ts @@ -14,9 +14,9 @@ import type { ErrorData, LevelLoadedData, } from '../types/events'; -import type { AbrComponentAPI } from '../types/component-api'; +import type { ComponentAPI } from '../types/component-api'; -class AbrController implements AbrComponentAPI { +class AbrController implements ComponentAPI { protected hls: Hls; private lastLoadedFragLevel: number = 0; private _nextAutoLevel: number = -1; diff --git a/src/types/component-api.ts b/src/types/component-api.ts index ac408daee64..046c0f29ef3 100644 --- a/src/types/component-api.ts +++ b/src/types/component-api.ts @@ -1,14 +1,7 @@ -import EwmaBandWidthEstimator from '../utils/ewma-bandwidth-estimator'; - export interface ComponentAPI { destroy(): void; } -export interface AbrComponentAPI extends ComponentAPI { - nextAutoLevel: Number; - readonly bwEstimator?: EwmaBandWidthEstimator; -} - export interface NetworkComponentAPI extends ComponentAPI { startLoad(startPosition: number): void; stopLoad(): void;