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
DOMString
that identifies the cue.
TextTrackCue.startTime
double
that represents the video time that the cue will start being displayed, in seconds.
TextTrackCue.endTime
double
that represents the video time that the cue will stop being displayed, in seconds.
TextTrackCue.pauseOnExit
boolean
for whether the video will pause when this cue stops being displayed.
TextTrackCue.onenter
enter
事件。
TextTrackCue.onexit
exit
事件。
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'TextTrackCue' in that specification. |
实时标准 | |
|
HTML5
The definition of 'TextTrackCue' in that specification. |
推荐 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
完整支持
兼容性未知
TextTrackCue