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
Parameter | Type | Description |
---|---|---|
track | AudioTrack |
setTextTrack()
setTextTrack(track): Promise<void>
Selects the text track. If the track is null, the text overlay will be hidden.
Parameters
Parameter | Type | Description |
---|---|---|
track | null | TextTrack | the 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
Parameter | Type | Description |
---|---|---|
rendition | VideoRendition |
setVideoTrack()
setVideoTrack(track): Promise<void>
Switches to the given the video track.
Parameters
Parameter | Type | Description |
---|---|---|
track | VideoTrack |