HTMLMediaElement: videoTracks property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The read-onlyvideoTracksproperty onHTMLMediaElement objects returns aVideoTrackList object listing all of theVideoTrackobjects representing the media element's video tracks.
The returned list islive; that is, as tracks are added to and removed fromthe media element, the list's contents change dynamically. Once you have a reference tothe list, you can monitor it for changes to detect when new video tracks are added orexisting ones removed. SeeVideoTrackList eventsto learn more about watching for changes to a media element's track list.
In this article
Value
AVideoTrackList object representing the list of video tracks includedin the media element. The list of tracks can be accessed using array notation, or usingthe object'sgetTrackById() method.
Each track is represented by aVideoTrack object which providesinformation about the track.
Specifications
| Specification |
|---|
| HTML> # dom-media-videotracks-dev> |
Browser compatibility
See also
HTMLMediaElement: Interface used to define theHTMLMediaElement.videoTracksproperty<video>VideoTrack,VideoTrackList