TrackManager
Extends
default
Methods
getVideoTracks()
getVideoTracks():
VideoTrack[]
Returns the video tracks.
Returns
getAudioTracks()
getAudioTracks():
AudioTrack[]
Returns the audio tracks.
Returns
getTextTracks()
getTextTracks():
TextTrack[]
Returns the text tracks including side-loaded tracks.
Returns
getVideoTrack()
getVideoTrack():
null|VideoTrack
Returns the active video track.
Returns
null | VideoTrack
getVideoRendition()
getVideoRendition():
null|VideoRendition
Returns the active video rendition. If adaptive video is enabled, returns null.
Returns
null | VideoRendition
getAdaptiveVideoEnabled()
getAdaptiveVideoEnabled():
boolean
Returns whether adaptive video is enabled.
Returns
boolean
getAudioTrack()
getAudioTrack():
null|AudioTrack
Returns the active audio track.
Returns
null | AudioTrack
getTextTrack()
getTextTrack():
null|TextTrack
Returns the active text track.
Returns
null | TextTrack
setVideoTrack()
setVideoTrack(
track):Promise<void>
Switches to the given the video track.
Parameters
| Parameter | Type | Description |
|---|---|---|
track | VideoTrack | The video track to switch to. |
Returns
Promise<void>
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 | The video rendition to switch to. |
Returns
Promise<void>
enableAdaptiveVideo()
enableAdaptiveVideo():
Promise<void>
Enforces adaptive video playback.
Returns
Promise<void>
setAudioTrack()
setAudioTrack(
track):Promise<void>
Switches to the given audio track.
Parameters
| Parameter | Type | Description |
|---|---|---|
track | AudioTrack | The audio track to switch to. |
Returns
Promise<void>
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 switch to, or null to hide text overlay |
Returns
Promise<void>
setVideoFilterConfiguration()
setVideoFilterConfiguration(
videoFilterConfiguration):Promise<void>
Note: This API is only supported on Android. On other platforms, the method safely performs no action.
Applies a video filter configuration to the current player instance.
This method allows defining constraints that influence how the player selects video tracks (e.g., limiting resolution, bitrate, or frame rate). The configuration is forwarded to the native Android player module.
When the configuration is successfully applied, the player emits a EventType.TrackModelChanged event, signalling that the active or selectable video tracks may have been updated.
Parameters
| Parameter | Type | Description |
|---|---|---|
videoFilterConfiguration | VideoFilterConfiguration | A set of video selection constraints. See VideoFilterConfiguration for full parameter details. If an empty object is provided, the player applies no filtering constraints. |
Returns
Promise<void>
A promise that resolves once the configuration has been applied on the native layer.
Example
await player.getTrackManager().setVideoFilterConfiguration({
maxBitrate: 2_000_000,
maxFramerate: 30,
maxHeight: 720,
});