Class: AudioTracksManager

Methods

getActiveId

getActiveId() returns number

Gets the active audio track ID.

Returns

nullable number 

getActiveTrack

getActiveTrack() returns cast.framework.messages.Track

Gets the active audio track.

Returns

nullable cast.framework.messages.Track 

getTrackById

getTrackById(id) returns cast.framework.messages.Track

Gets the audio track that matches id.

Parameter

id

number

Throws

non-null Error if id is unavailable or invalid.

Returns

nullable cast.framework.messages.Track 

getTracks

getTracks() returns Array of non-null cast.framework.messages.Track

Returns all audio tracks.

Returns

non-null Array of non-null cast.framework.messages.Track 

getTracksByLanguage

getTracksByLanguage(language) returns Array of non-null cast.framework.messages.Track

Gets all the audio tracks that match language.

Parameter

language

string

Language tag as per RFC 5646.

Throws

non-null Error if language is not available.

Returns

non-null Array of non-null cast.framework.messages.Track 

setActiveById

setActiveById(id)

Sets the audio track that matches id to the active state.

Parameter

id

number

The track ID

Throws

non-null Error if id is not an audio track ID.

setActiveByLanguage

setActiveByLanguage(language)

Sets the first audio track that matches language to the active state.

Parameter

language

string

Language tag as per RFC 5646.

Throws

non-null Error if language is not available or invalid.