Easy Tutorial
❮ Prop Style Borderimagerepeat Met Doc Close ❯

Video audioTracks Property

Video Object

Example

Get the number of available audio tracks:

var x = document.getElementById("myVideo").audioTracks.length;

Definition and Usage

The audioTracks property returns an AudioTrackList object.

The AudioTrackList object represents the available audio tracks of a video.

Each available track is represented by an AudioTrack object.


Browser Support

The audioTracks property is not supported by any major browsers.


Syntax

Return Value

Type Description
AudioTrackList Object Represents the available audio tracks of a video. AudioTrackList object: audioTracks.length - the number of available audio tracks<br>audioTracks.getTrackById(id) - gets the AudioTrack object by id<br>audioTracks[index] - gets the AudioTrack object by index. Note: The index of the first available AudioTrack object is 0.
AudioTrack Object Represents an audio track. Properties of the AudioTrack object: id - gets the id of the track<br>kind - gets the type of the track (can be "alternative", "description", "main", "translation", "commentary", or "" (empty string))<br>label - gets the label of the track<br>language - gets the language of the track<br>enabled - gets or sets whether the track is active (true false)
❮ Prop Style Borderimagerepeat Met Doc Close ❯