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 strings of text 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.trackRead only

The 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.

Event handlers

TextTrackCue.onenter

The event handler fired when a cue becomes active.

TextTrackCue.onexit

The event handler fired when the cue has stopped being active.

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
TextTrackCue
23
12
31
10
≤12.1
6
≤37
25
31
≤12.1
7
1.5
endTime
23
12
31
10
≤12.1
6
≤37
25
31
≤12.1
7
1.5
enter_event
23
12
31
10
?
6
≤37
25
31
?
7
1.5
exit_event
23
12
31
10
?
6
≤37
25
31
?
7
1.5
id
23
12
31
10
≤12.1
6
≤37
25
31
≤12.1
7
1.5
onenter
23
12
31
10
≤12.1
6
≤37
25
31
≤12.1
7
1.5
onexit
23
12
31
10
≤12.1
6
≤37
25
31
≤12.1
7
1.5
pauseOnExit
23
12
31
10
≤12.1
6
≤37
25
31
≤12.1
7
1.5
startTime
23
12
31
10
≤12.1
6
≤37
25
31
≤12.1
7
1.5
track
23
12
31
10
≤12.1
6
≤37
25
31
≤12.1
7
1.5

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCue