Video audioTracks property
Example
Get the number of available audio tracks:
var x = document.getElementById("myVideo").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
videoObject
.audioTracks
Return Value
| Type | Description |
|---|---|
| AudioTrackList Object |
Represents the available audio tracks of the audio/video. AudioTrackList object: |
Note:The index of the first available AudioTrack object is 0.
| | AudioTrack object |Represents an audio track.
Properties of the AudioTrack object:
- id - Get the id of the audio track
- kind - Get the type 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)
The Video object