HTMLMediaElement.videoTracks
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
videoTracks
为 HTMLMediaElement
的只读属性,它是一个 VideoTrackList
列表,列表中包含相应媒体元素的视频轨,视频轨为VideoTrack
类型对象。
它是一个实时列表; 当相应的媒体元素增加或删除视频轨时,返回列表会发生动态的改变。由此你可以监控和检测视频轨发生的变化。学习 VideoTrackList 事件可以获得更多关于 media element 视频轨的知识。
Syntax
var videoTracks = mediaElement.videoTracks;
返回值
返回的是一个VideoTrackList
类型值,为相应媒体元素的视频轨列表。可以用访问数组的方法访问这个值,或 getTrackById()
方法访问它。
列表中包含的每一个 VideoTrack
代表其中的一个视频轨。
Specifications
Specification |
---|
HTML # dom-media-videotracks-dev |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
videoTracks |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- User must explicitly enable this feature.
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
See also
- The interface defining it,
HTMLMediaElement
. <video>
VideoTrack
andVideoTrackList