HTML Audio/Video DOM audioTracks attribute
Example
Get the number of available tracks:
myVid=document.getElementById("video1"); alert(myVid.audioTracks.length);
Definition and usage
The audioTracks attribute returns an AudioTrackList object.
The AudioTrackList object represents the available audio and video tracks.
Each available track is represented by an AudioTrack object.
Browser support
Any mainstream browser does not support the audioTracks attribute.
Syntax
audio|video.audioTracks
Return value
Type | Description |
---|---|
AudioTrackList object |
Represents the available audio tracks for audio and video. AudioTrackList Object:
Note:The index of the first available AudioTrack object is 0. |
AudioTrack Object |
Represents the track. Properties of AudioTrack Object:
|