TextTrackCue

TextTrackCue is an abstract class which is used as the basis for the various derived cue types, such as VTTCue ; you will instead work with those derived types. These cues represent a string of text that is presented for some duration of time during the performance of a TextTrack . The cue includes the start time (the time at which the text will be displayed) and the end time (the time at which it will be removed from the display), as well as other information.

特性

This interface also inherits properties from EventTarget .

TextTrackCue.track 只读
TextTrack that this cue belongs to, or null if it doesn't belong to any.
TextTrackCue.id
A DOMString that identifies the cue.
TextTrackCue.startTime
A double that represents the video time that the cue will start being displayed, in seconds.
TextTrackCue.endTime
A double that represents the video time that the cue will stop being displayed, in seconds.
TextTrackCue.pauseOnExit
A boolean for whether the video will pause when this cue stops being displayed.

事件处理程序

TextTrackCue.onenter
The event handler for the enter 事件。
TextTrackCue.onexit
The event handler for the exit 事件。

规范

规范 状态 Comment
HTML Living Standard
The definition of 'TextTrackCue' in that specification.
实时标准
HTML5
The definition of 'TextTrackCue' in that specification.
Recommendation 初始定义

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
TextTrackCue Chrome 9 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android Yes Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0
endTime Chrome 9 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android Yes Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0
enter event Chrome 18 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android Yes Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0
exit event Chrome 18 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android Yes Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0
id Chrome 9 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android Yes Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0
pauseOnExit Chrome 9 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android Yes Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0
startTime Chrome 9 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android Yes Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0
track Chrome 9 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android Yes Chrome Android 18 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 1.0

图例

完整支持
完整支持
兼容性未知
兼容性未知