Audio audioTracks attribute
Definition and usage
audioTracks
The property returns an AudioTrackList object.
The AudioTrackList object represents the available audio tracks of the audio.
Each available audio track is represented by an AudioTrack object.
Example
Get the number of available audio tracks:
var x = document.getElementById("myAudio").audioTracks.length;
Syntax
audioObject.audioTracks
Return value
Type | Description |
---|---|
AudioTrackList object |
Represents the available audio tracks of the audio. AudioTrackList object:
Note:The first available AudioTrack object is at index 0 |
AudioTrack object |
Represents the audio track. AudioTrack object properties:
The kind attribute can be of the following types:
|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Not Supported | Not Supported | Not Supported | Not Supported | Not Supported |