Skip to content

Type Alias: BolaSelector ​

ts
type BolaSelector = Omit<BitrateSelector, "select"> & object;

Defined in: BolaSelector.ts:16

Beta

A BOLA bitrate selector.

The type has the members of BitrateSelector. Its select returns a BolaDecision. A BolaDecision adds the state and the placeholder buffer. The type omits the select of BitrateSelector and does not intersect with it. An intersection of two select signatures resolves to the first one, and that hides the added fields. Every BolaSelector is also a BitrateSelector.

Type Declaration ​

select() ​

ts
select(input): BolaDecision;

Chooses the rung of the next segment from the buffer level.

The player calls this method after the sample of the previous segment. It calls it before the next request, not during a download. When the decision has a delay, the player waits and calls this method again. When the buffer drained during the wait, the second call returns a delay of 0. When the buffer did not drain, for example in a paused player, the second call returns the delay again.

Parameters ​

input ​

BitrateSelectorInput

The ladder, the buffer level, the throughput estimate, and the optional buffer target, segment duration, and playback rate

Returns ​

BolaDecision

The position of the chosen rung in input.ladder, the delay, the state, and the placeholder buffer

Throws ​

RangeError when the ladder is empty or has a bandwidth that is not a positive finite number

Throws ​

RangeError when the ladder is not in ascending order of bandwidth

Throws ​

RangeError when input.bufferTarget is not a positive finite number

A Streaming Video Technology Alliance project.