<視頻對象
例
獲取可用文本軌道的數量:
var x = document.getElementById("myVideo").textTracks.length;
試一試»
定義和用法
該textTracks屬性返回TextTrackList對象。
該TextTrackList對象表示視頻中的可用文本軌道。
每個可用的文本軌道由這一點,TextTrack對象表示。
瀏覽器支持





該textTracks屬性在Internet Explorer中,歌劇,鉻,和Safari 6支持。
注:在Firefox和Internet Explorer 9及更早版本不支持textTracks財產。
句法
返回值
類型 | 描述 |
---|
TextTrackList Object | 代表了視頻中的可用文本軌道。 TextioTrackList對象: - 長度 - 獲取文本數量的視頻軌道可用
- [ 指數 ] -度日指數一點,TextTrack對象
注意:第一個可用的一點,TextTrack對象是指數 0 |
TextTrack Object | 表示一個文本軌道。 這一點,TextTrack對象屬性: - 樣-獲取文本軌道的類型(可以是: "subtitles" , "caption" , "descriptions" , "chapters"或“元數據”)
- 標籤 - 獲取文本軌道的標籤
- 語言 - 獲取文本軌道的語言
- 模式-獲取或設置如果軌道處於活動狀態("disabled"|"hidden"|"showing")
- 線索 - 得到線索的列表作為TextTrackCueList對象
- activeCues - 獲得當前活動的文本軌道線索作為TextTrackCueList對象
- addCue( cue ) -一個提示添加到提示列表
- removeCue( cue ) -從提示列表中刪除的提示
|
<視頻對象