HTML Audio/Video DOM videoTracks Property
HTML Audio/Video DOM Reference
Example
Get the number of available video tracks:
myVid=document.getElementById("video1");
alert(myVid.videoTracks.length);
Try it »
Definition and Usage
The videoTracks property returns a VideoTrackList object.
The VideoTrackList object represents the available video tracks of the video.
Each available video track is represented by a VideoTrack object.
Browser support





No major browser supports the videoTracks property.
Syntax
video
.videoTracks
Return Value
| Type | Description |
|---|---|
| VideoTrackList object | Represents the available video tracks of the video.
VideoTrackList object: |
Note:The index of the first available VideoTrack object index is 0.
| | VideoTrack object | Represents a video track.Properties of the VideoTrack object:
- id - Get the id of the video track
- kind - Gets the type of the video track (can be "alternative", "captions", "main", "sign", "subtitles", "commentary", or "" (empty string))
- label - Get the label of the video track
- language - Get the language of the video track
- selected - Gets or sets whether the video track is active (true\|false)
HTML Audio/Video DOM Reference