HTMLDOMトラックオブジェクト
トラックオブジェクト
Trackオブジェクトは、HTMLの<track>要素を表します。
トラックオブジェクトにアクセスする
getElementById()を使用して、<track>要素にアクセスできます。
var x = document.getElementById("myTrack");
トラックオブジェクトを作成する
document.createElement()メソッドを使用して、<track>要素を作成できます。
var x = document.createElement("TRACK");
オブジェクトのプロパティを追跡する
Property | Description |
---|---|
default | Sets or returns the default state of the track |
kind | Sets or returns the value of the kind attribute of the track |
label | Sets or returns the value of the label attribute of the track |
readyState | Returns the current state of the track resource |
src | Sets or returns the value of the src attribute of the track |
srclang | Sets or returns the value of the srclang attribute of the track |
track | Returns a TextTrack object representing the track element's text track data |
標準のプロパティとイベント
Trackオブジェクトは、標準のプロパティとイベントもサポートします。
関連ページ
HTMLリファレンス:HTML <track>タグ