YouTip LogoYouTip

Prop Video Audiotracks

# HTML DOM Video audioTracks Property # Video audioTracks Property [![Image 8: Video Object Reference](#) Video Object](#) ## Example Get the number of available audio tracks: ```javascript var x = document.getElementById("myVideo").audioTracks.length; [Try it Yourself Β»](#) * * * ## Definition and Usage The `audioTracks` property returns an `AudioTrackList` object. The `AudioTrackList` object represents the available audio tracks of an audio/video. Each available audio track is represented by an `AudioTrack` object. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) The `audioTracks` property is not supported by any major browser. * * * ## Syntax _videoObject_.audioTracks ## Return Value | Type | Description | | --- | --- | | AudioTrackList object | Represents the available audio tracks of an audio/video.
AudioTrackList object:
* `audioTracks.length` - Returns the number of available audio tracks
* `audioTracks.getTrackById(id)` - Returns the AudioTrack object by its id
* `audioTracks` - Returns the AudioTrack object by its index
Note: The index of the first available AudioTrack object is 0. | | AudioTrack object | Represents an audio track.
AudioTrack object properties:
* `id` - Returns the id of the audio track
* `kind` - Returns the kind of the audio track (can be "alternative", "description", "main", "translation", "commentary", or "" (empty string))
* `label` - Returns the label of the audio track
* `language` - Returns the language of the audio track
* `enabled` - Returns or sets whether the audio track is active (true|false) | * * Video Object](#)
← Prop Video AutoplayProp Video Autoplay β†’