Skip to main content

TrackManager

Methods

enableAdaptiveVideo()

enableAdaptiveVideo(): Promise<void>

Enforces adaptive video playback.


getAdaptiveVideoEnabled()

getAdaptiveVideoEnabled(): boolean

Returns whether adaptive video is enabled.


getAudioTrack()

getAudioTrack(): null | AudioTrack

Returns the active audio track.


getAudioTracks()

getAudioTracks(): AudioTrack[]

Returns the audio tracks.


getTextTrack()

getTextTrack(): null | TextTrack

Returns the active text track.


getTextTracks()

getTextTracks(): TextTrack[]

Returns the text tracks including side-loaded tracks.


getVideoRendition()

getVideoRendition(): null | VideoRendition

Returns the active video rendition. If adaptive video is enabled, returns null.


getVideoTrack()

getVideoTrack(): null | VideoTrack

Returns the active video track.


getVideoTracks()

getVideoTracks(): VideoTrack[]

Returns the video tracks.


setAudioTrack()

setAudioTrack(track): Promise<void>

Switches to the given audio track.

Parameters

ParameterTypeDescription
trackAudioTrack

setTextTrack()

setTextTrack(track): Promise<void>

Selects the text track. If the track is null, the text overlay will be hidden.

Parameters

ParameterTypeDescription
tracknull | TextTrackthe text track to select, or null to hide text overlay

setVideoRendition()

setVideoRendition(rendition): Promise<void>

Switches to the given the video track. As a consequence, adaptive video will be disabled.

Parameters

ParameterTypeDescription
renditionVideoRendition

setVideoTrack()

setVideoTrack(track): Promise<void>

Switches to the given the video track.

Parameters

ParameterTypeDescription
trackVideoTrack