Easy Tutorial
❮ Att Th Align Att Img Height ❯

HTML Audio/Video DOM videoTracks Property

HTML Audio/Video DOM Reference Manual

Example

Get the number of available video tracks:


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

All major browsers do not support the videoTracks property.


Syntax

Return Value

Type Description
VideoTrackList Object Represents the available video tracks of the video. VideoTrackList object: videoTracks.length - Get the number of available video tracks in the video<br> videoTracks.getTrackById(id) - Get the VideoTrack object by id<br> videoTracks[index] - Get the VideoTrack object by index<br> videoTracks.selectedIndex - Get the index of the current VideoTrack object Note: The index of the first available VideoTrack object is 0.
VideoTrack Object Represents a video track. Properties of the VideoTrack object: id - Get the id of the video track<br> kind - Get the type of the video track (can be "alternative", "captions", "main", "sign", "subtitles", "commentary", or "" (empty string))<br> label - Get the label of the video track<br> language - Get the language of the video track<br> selected - Get or set whether the video track is active (true false)
❮ Att Th Align Att Img Height ❯