HTML Audio/Video DOMaudioTracksProperty
HTML Audio/Video DOM Reference Manual
Example
Get the number of available audio tracks:
myVid=document.getElementById("video1");
alert(myVid.audioTracks.length);
alert(myVid.audioTracks.length);
Try it Yourself »
Definition and Usage
The audioTracks property returns an AudioTrackList object.
The AudioTrackList object represents the available audio tracks of audio/video.
Each available audio track is represented by an AudioTrack object.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers do not support the audioTracks property.
Syntax
audio|video.audioTracks
Return Value
| Type | Description |
|---|---|
| AudioTrackList object | Represents the available audio tracks of audio/video. AudioTrackList object:
Note:Of the first available AudioTrack objectIndexis 0. |
| AudioTrack object | Indicates the audio track. Properties of AudioTrack objects:
|
HTML Audio/Video DOM Reference Manualother extensions