VTTCue

open class VTTCue(startTime: Double, endTime: Double, var text: String) : TextTrackCue(source)

The VTTCue interface of the WebVTT API represents a cue that can be added to the text track associated with a particular video (or other media).

MDN Reference

Constructors

Link copied to clipboard
constructor(startTime: Double, endTime: Double, text: String)

Properties

Link copied to clipboard

The align property of the VTTCue interface represents the alignment of all of the lines of text in the text box.

Link copied to clipboard

The endTime property of the TextTrackCue interface returns and sets the end time of the cue.

Link copied to clipboard
var id: String

The id property of the TextTrackCue interface returns and sets the identifier for this cue.

Link copied to clipboard

The line property of the VTTCue interface represents the cue line of this WebVTT cue.

Link copied to clipboard

The lineAlign property of the VTTCue interface represents the alignment of this VTT cue.

Link copied to clipboard

The pauseOnExit property of the TextTrackCue interface returns or sets the flag indicating whether playback of the media should pause when the end of the range to which this cue applies is reached.

Link copied to clipboard

The position property of the VTTCue interface represents the indentation of the cue within the line.

Link copied to clipboard

The positionAlign property of the VTTCue interface is used to determine what VTTCue.position is anchored to.

Link copied to clipboard

The region property of the VTTCue interface returns and sets the VTTRegion that this cue belongs to.

Link copied to clipboard

The size property of the VTTCue interface represents the size of the cue as a percentage of the video size.

Link copied to clipboard

The snapToLines property of the VTTCue interface is a Boolean indicating if the VTTCue.line property is an integer number of lines, or a percentage of the video size.

Link copied to clipboard

The startTime property of the TextTrackCue interface returns and sets the start time of the cue.

Link copied to clipboard

The text property of the VTTCue interface represents the text contents of the cue.

Link copied to clipboard

The track read-only property of the TextTrackCue interface returns the TextTrack object that this cue belongs to.

Link copied to clipboard

The vertical property of the VTTCue interface is a string representing the cue's writing direction.

Functions

Link copied to clipboard
Link copied to clipboard

The getCueAsHTML() method of the VTTCue interface returns a DocumentFragment containing the cue content.

Link copied to clipboard