HTML Audio/Video DOM audioTracks Property
HTML Audio/Video DOM Reference
Example
Get the number of available audio tracks:
myVid=document.getElementById("video1");
alert(myVid.audioTracks.length);
Try it »
Definition and Usage
The audioTracks property returns an AudioTrackList object.
The AudioTrackList object represents the available audio tracks of the audio/video.
Each available audio track is represented by an AudioTrack object.
Browser support





No major browser supports the audioTracks property.
Syntax
audio|video
.audioTracks
Return Value
| Type | Description |
|---|---|
| AudioTrackList Object | Represents the available audio tracks of the audio/video.
AudioTrackList object: |
Note:The first available AudioTrack object'sSubscriptis 0.
| | AudioTrack Object | Represents an audio track.Properties of the AudioTrack object:
- id - Get the id of the audio track
- kind - Get the kind of the audio track (can be "alternative", "description", "main", "translation", "commentary", or "" (empty string))
- label - Get the label of the audio track
- language - Get the language of the audio track
- enabled - Get or set whether the audio track is active (true|false)
HTML Audio/Video DOM Reference