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.
Properties
This interface also inherits properties from EventTarget
.
TextTrackCue.track
Read only- The
TextTrack
that this cue belongs to, ornull
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.
Event handlers
TextTrackCue.onenter
- The event handler for the
enter
event. TextTrackCue.onexit
- The event handler for the
exit
event.
Specifications
Specification | Status | Comment |
HTML Living StandardThe definition of 'TextTrackCue' in that specification. | Living Standard | |
HTML5The definition of 'TextTrackCue' in that specification. | Recommendation | Initial definition |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
TextTrackCue
|
Chrome
Full support 9 |
Edge
Full support ≤79 |
Firefox
? |
IE
? |
Opera
? |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support 18 |
Firefox Android
? |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
Full support 1.0 |
endTime
|
Chrome
Full support 9 |
Edge
Full support ≤79 |
Firefox
? |
IE
? |
Opera
? |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support 18 |
Firefox Android
? |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
Full support 1.0 |
enter event
|
Chrome
Full support 18 |
Edge
Full support ≤79 |
Firefox
? |
IE
? |
Opera
? |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support 18 |
Firefox Android
? |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
Full support 1.0 |
exit event
|
Chrome
Full support 18 |
Edge
Full support ≤79 |
Firefox
? |
IE
? |
Opera
? |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support 18 |
Firefox Android
? |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
Full support 1.0 |
id
|
Chrome
Full support 9 |
Edge
Full support ≤79 |
Firefox
? |
IE
? |
Opera
? |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support 18 |
Firefox Android
? |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
Full support 1.0 |
pauseOnExit
|
Chrome
Full support 9 |
Edge
Full support ≤79 |
Firefox
? |
IE
? |
Opera
? |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support 18 |
Firefox Android
? |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
Full support 1.0 |
startTime
|
Chrome
Full support 9 |
Edge
Full support ≤79 |
Firefox
? |
IE
? |
Opera
? |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support 18 |
Firefox Android
? |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
Full support 1.0 |
track
|
Chrome
Full support 9 |
Edge
Full support ≤79 |
Firefox
? |
IE
? |
Opera
? |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support 18 |
Firefox Android
? |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
Full support 1.0 |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown
TextTrackCue by Mozilla Contributors is licensed under CC-BY-SA 2.5.