オーディオaddTextTrack()メソッド
例
オーディオに新しいテキストトラックを追加します。
var x = document.getElementById("myAudio");
var y = x.addTextTrack("caption");
y.addCue(new TextTrackCue("Test text", 01.000, 04.000,"","","",true));
定義と使用法
addTextTrack()メソッドは、新しいTextTrackオブジェクトを作成して返します。
新しいTextTrackオブジェクトが、オーディオ要素のテキストトラックのリストに追加されます。
ブラウザのサポート
Method | |||||
---|---|---|---|---|---|
addTextTrack() | Not supported | Not supported | Not supported | Not supported | Not supported |
構文
audioObject.addTextTrack(kind, label, language)
パラメータ値
Value | Description |
---|---|
kind | Specifies the kind of text track. Possible values:
|
label | A string specifying the label for the text track. Is used to identify the text track for the users |
language | A two-letter language code that specifies the language of the text track. To view all available language codes, go to our Language code reference |
技術的な詳細
戻り値: | 新しいテキストトラックを表すTextTrackオブジェクト |
---|
❮オーディオオブジェクト