TextTrack

The TextTrack interface of the WebVTT API represents a text track associated with a media element.

MDN Reference

Properties

Link copied to clipboard

The activeCues read-only property of the TextTrack interface returns a TextTrackCueList object listing the currently active cues.

Link copied to clipboard

The cues read-only property of the TextTrack interface returns a TextTrackCueList object containing all of the track's cues.

Link copied to clipboard
val id: String

The id read-only property of the TextTrack interface returns the ID of the track if it has one.

Link copied to clipboard

The inBandMetadataTrackDispatchType read-only property of the TextTrack interface returns the text track's in-band metadata dispatch type of the text track represented by the TextTrack object.

Link copied to clipboard

The kind read-only property of the TextTrack interface returns the kind of text track this object represents.

Link copied to clipboard

The label read-only property of the TextTrack interface returns a human-readable label for the text track, if it is available.

Link copied to clipboard

The language read-only property of the TextTrack interface returns the language of the text track.

Link copied to clipboard

The TextTrack interface's mode property is a string specifying and controlling the text track's mode: disabled, hidden, or showing.

Functions

Link copied to clipboard

The addCue() method of the TextTrack interface adds a new cue to the list of cues.

Link copied to clipboard
Link copied to clipboard

The removeCue() method of the TextTrack interface removes a cue from the list of cues.

Link copied to clipboard