Skip to content

Commit

Permalink
Revert "Documentation - Add interface for AbrController (#4842)"
Browse files Browse the repository at this point in the history
This reverts commit 617d78b.
  • Loading branch information
Rob Walch committed Jan 16, 2023
1 parent 617d78b commit 01c48d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
3 changes: 2 additions & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`.
Expand Down
4 changes: 2 additions & 2 deletions src/controller/abr-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 0 additions & 7 deletions src/types/component-api.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 01c48d6

Please sign in to comment.