Interface ABRConfiguration

Describes the adaptive bitrate configuration.

Remarks


- Available since v2.30.0.

interface ABRConfiguration {
    bufferLookbackWindow?: number;
    clearBufferWhenSettingTargetQuality: boolean;
    maxBufferLength: number;
    strategy?: ABRStrategy;
    targetBuffer?: number;
}

Properties

bufferLookbackWindow?: number

The amount of data which the player should keep in its buffer before the current playback position, in seconds. This configuration option can be used to reduce the memory footprint on memory restricted devices or on devices which don't automatically prune decoder buffers.

Note that the player can decide to keep less data in the decoder buffer in case memory is running low. A value of 0 or lower is not accepted and will be treated as default.

Default Value

30

clearBufferWhenSettingTargetQuality: boolean

Clears the buffer when setting a single target quality on a MediaTrack.

Remarks


- Available since v6.8.0 for HLS streams only.

Default Value

false

maxBufferLength: number

The maximum length of the player's buffer, in seconds.

The player will initially buffer up to ABRConfiguration.targetBuffer seconds of media data. If the player detects that the decoder is unable to hold so much data, it will reduce maxBufferLength and restrict targetBuffer to be less than this maximum.

strategy?: ABRStrategy

The adaptive bitrate strategy.

Default Value

'bandwidth'

targetBuffer?: number

The amount which the player should buffer ahead of the current playback position, in seconds.

Remarks


- Before v4.3.0: This duration has a maximum of 60 seconds.
- After v4.3.0: This duration has no maximum.
- The player might reduce or ignore the configured amount because of device or performance constraints.

Default Value

20

Generated using TypeDoc