HTML DOM Area Object
HTML DOM Base Object
In-depth Exploration
Scripting Languages
Development Tools
Network Services
Software
Web Design and Development
Web Service
Scripting
Programming
Programming Languages
Computer Science
Audio audioTracks Property
Audio Object
Example
Get the number of available audio tracks:
var x = document.getElementById("myAudio").audioTracks.length;
Try it Yourself Β»
Definition and Usage
The audioTracks property returns an AudioTrackList object.
Returns an AudioTrackList object representing the available audio tracks.
Each audio track represents an AudioTrack object.
Browser Support

The audioTracks property is not supported by any major browser.
Syntax
audioObject.audioTracks
Return Value
| Type |
Description |
| AudioTrackList object |
Represents the available audio tracks of the audio element.
AudioTrackList object:
- audioTracks.length - Get the number of available audio tracks
- audioTracks.getTrackById(id) - Get an AudioTrack object by its id
- audioTracks[index] - Get an AudioTrack object by index
Note: (index) 0 represents the first available AudioTrack object.
|
| AudioTrack object |
Represents an audio track.
AudioTrack object properties:
- 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 track is active (true|false)
|
* Audio Object
AI is thinking...
HTML DOM Area Object
HTML DOM Base Object