Easy Tutorial
❮ Prop Style Zindex Jsref Floor ❯

audioTracks Property

Audio Object

Example

Get the number of available audio tracks:


Definition and Usage

The audioTracks property returns an AudioTrackList object.

It returns an AudioTrackList object representing the available audio tracks.

Each audio track is represented by an AudioTrack object.


Browser Support

All major browsers do not support the audioTracks property.


Syntax

Return Value

Type Description
AudioTrackList Object Represents the available audio tracks of the audio. AudioTrackList Object: audioTracks.length - Get the number of available audio tracks<br> audioTracks.getTrackById(id) - Get the AudioTrack object by id<br> audioTracks[index] - Get the AudioTrack object by index. Note: (index) 0 represents the first available AudioTrack object.
AudioTrack Object Represents an audio track. AudioTrack Object properties: id - Get the audio track's id<br> kind - Get the audio track's type (can be: "alternative", "description", "main", "translation", "commentary", or "" (empty string))<br> label - Get the audio track's label<br> language - Get the audio track's language<br> enabled - Get or set whether the track is active (true false)
❮ Prop Style Zindex Jsref Floor ❯