WebVTT
The TextTrackCue interface of the WebVTT API is the abstract base class for the various derived cue types, such as VTTCue and DataCue; you will work with these derived types rather than the base class.
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.
Instance properties
This interface also inherits properties from EventTarget.
- TextTrackCue.track
- : The TextTrack that this cue belongs to, or
nullif it doesn't belong to any.
- : The TextTrack that this cue belongs to, or
- TextTrackCue.id
- : A string that identifies the cue.
- TextTrackCue.startTime
- : A
doublethat represents the video time that the cue will start being displayed, in seconds.
- : A
- TextTrackCue.endTime
- : A
doublethat represents the video time that the cue will stop being displayed, in seconds.
- : A
- TextTrackCue.pauseOnExit
- : A
booleanfor whether the video will pause when this cue stops being displayed.
- : A
Events
- TextTrackCue.enter_event
- : Fired when a cue becomes active.
- TextTrackCue.exit_event
- : Fired when the cue has stopped being active.
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
