トラックの種類プロパティ
例
ある種のテキストトラックを取得します。
var x = document.getElementById("myTrack").kind;
xの結果は次のようになります。
subtitles
定義と使用法
kindプロパティは、トラックのkind属性の値を設定または返します。
kind属性は、テキストトラックの種類を指定します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
kind | Yes | 10.0 | Not supported | Not supported | Yes |
構文
kindプロパティを返します。
trackObject.kind
kindプロパティを設定します。
trackObject.kind = "captions|chapters|descriptions|metadata|subtitles"
プロパティ値
Value | Description |
---|---|
captions | The track defines translation of dialogue and sound effects (suitable for deaf users) |
chapters | The track defines chapter titles (suitable for navigating the media resource) |
descriptions | The track defines a textual description of the video content (suitable for blind users) |
metadata | The track defines content used by scripts. Not visible for the user |
subtitles | The track defines subtitles, used to display subtitles in a video |
技術的な詳細
戻り値: | テキストトラックの種類を表す文字列 |
---|
その他の例
例
テキストトラックの種類を設定します。
document.getElementById("myTrack").kind = "chapters";
関連ページ
HTML参照:HTML <track>種類属性
❮トラックオブジェクト