VideoTrackList object
Represents a list of VideoTrack objects.
![]() |
Members
The VideoTrackList object has these types of members:
Events
The VideoTrackList object has these events.
| Event | Description |
|---|---|
| addtrack |
Occurs when a track is added to the track list on a video object. |
| onchange |
Occurs when an AudioTrack or VideoTrack in the AudioTrackList or VideoTrackList associated with a video is enabled or disabled. |
| onremovetrack |
Fires when an AudioTrack or VideoTrack is removed from the AudioTrackList or VideoTrackList. |
Methods
The VideoTrackList object has these methods.
| Method | Description |
|---|---|
| getTrackById |
Returns the first track with the specified id in a track list. |
| item |
Returns a track from a list that corresponds with the given index based on track order. |
Properties
The VideoTrackList object has these properties.
| Property | Access type | Description |
|---|---|---|
|
Read-only |
Returns the number of tracks in TextTrackList, VideoTrackList, TextTrackCueList, or AudioTrackList objects. | |
|
Read-only |
Returns the index of the currently selected VideoTrack. | |
|
Returns a VideoTrackList object with the video tracks for a given video element. |
Standards information
