HTMLMediaElement: videoTracks プロパティ

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

videoTracksHTMLMediaElement オブジェクトの読み取り専用プロパティで、メディア要素の動画トラックを表すすべての VideoTrack オブジェクトを列挙した VideoTrackList オブジェクトを返します。

返されたリストは生きています。つまり、トラックがメディア要素に追加されたり取り除かれたりすると、リストの内容は動的に変化します。 リストへの参照を取得したら、新しい動画トラックが追加されたのか既存のトラックが取り除かれたのかを検出するために変更を監視できます。 メディア要素のトラックリストへの変更を監視する方法の詳細については、VideoTrackList のイベントを参照してください。

メディア要素に含まれる動画トラックのリストを表す VideoTrackList オブジェクト。 トラックのリストは、配列記法や、オブジェクトの getTrackById() メソッドを使ってアクセスできます。

各トラックは、トラックに関する情報を提供する VideoTrack オブジェクトによって表されます。

仕様書

Specification
HTML
# dom-media-videotracks-dev

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
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.

関連情報