Constructor

AudioTracksManager

new AudioTracksManager(params)

Parameter

params

Object

Value must not be null.

Methods

getActiveId

getActiveId() returns number

Gets the active audio 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 audio track by id.

Parameter

id

number

Throws

Error If id is not available 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 audio tracks by language.

Parameter

language

string

Throws

Error If language is not available.

Returns

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

setActiveById

setActiveById(id)

Sets a single audio track to be active by id.

Parameter

id

number

Throws

Error If id is not a audio track id.

setActiveByLanguage

setActiveByLanguage(language)

Sets the first matching audio track to be active by language.

Parameter

language

string

Throws

Error If language is not available or invalid.