Easy Tutorial
❮ Prop Url Type Prop Password Readonly ❯

Video videoTracks Property

Video Object

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.

The VideoTrack object represents each available video track.


Browser Support

Currently, no major browsers support the videoTracks property.


Syntax

Return Value

Type Description
VideoTrackList Object Represents the available video tracks. Properties of VideoTrackList object: videoTracks.length - Get the number of available video tracks<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 single video track. Properties of 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)
❮ Prop Url Type Prop Password Readonly ❯