Interface WebVTTCue

Represents a cue of a WebVTT text track.

interface WebVTTCue {
    align: VTTAlignSetting;
    content: string;
    endTime: number;
    id: string;
    line: VTTLine;
    lineAlign: VTTLineAlignSetting;
    position: VTTPosition;
    positionAlign: VTTPositionAlignSetting;
    region: null | WebVTTRegion;
    size: number;
    snapToLines: boolean;
    startTime: number;
    text: string;
    track: TextTrack;
    uid: number;
    vertical: VTTDirectionSetting;
    addEventListener<TType>(type, listener): void;
    removeEventListener<TType>(type, listener): void;
}

Hierarchy (view full)

Properties

The text alignment of the cue.

content: string

The content of the cue in raw unparsed form.

endTime: number

The playback position at which the cue becomes inactive, in seconds.

id: string

The identifier of the cue.

line: VTTLine

The line offset of the cue.

The line alignment of the cue.

position: VTTPosition

The position of the cue.

The position alignment of the cue.

region: null | WebVTTRegion

The region of the cue.

size: number

The size of the cue's box.

Remarks


- This property is to be interpreted as a percentage of the video, relative to the cue direction stated by WebVTTCue.vertical.

snapToLines: boolean

Whether snap-to-lines is enabled for the cue.

Remarks


- This property indicates whether WebVTTCue.line is an integer number of lines or a percentage of the dimension of the video.

startTime: number

The playback position at which the cue becomes active, in seconds.

text: string

The text of the cue in raw unparsed form.

track: TextTrack

The text track of the cue.

uid: number

A unique identifier of the text track cue.

Remarks


- This identifier is unique across text track cues of a THEOplayer instance and can be used to distinguish between cues.
- This identifier is a randomly generated number.

The writing direction of the cue.

Methods

Generated using TypeDoc