<视频对象
例
获取可用文本轨道的数量:
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 ) -从提示列表中删除的提示
|
<视频对象