Interface TTMLCue

Represents a cue of a TTML text track.

interface TTMLCue {
    content: any;
    endTime: number;
    extent: undefined | TTMLExtent;
    id: string;
    metadata: any;
    regions: Record<string, StylePropertyRecord>;
    startTime: number;
    styles: Record<string, StylePropertyRecord>;
    track: TextTrack;
    uid: number;
    addEventListener<TType>(type, listener): void;
    removeEventListener<TType>(type, listener): void;
}

Hierarchy (view full)

Properties

content: any

The content of the cue.

Remarks


- The content is an intermediate TTML document’s body element. This is a view of a TTML document where all nodes in the document are active during the cue’s startTime and endTime. As a result, all begin, dur and end properties have been removed. TTML Styles, Regions and Metadata are stored in cue.styles, cue.regions, cue.metadata respectively. Combining those properties with the given content should suffice to render a TTML cue.

endTime: number

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

extent: undefined | TTMLExtent

The extent of the TTML root container region, as specified by the tts:extent attribute of the <tt> element.

Remarks

  • Available since v8.1.1.

See

https://www.w3.org/TR/ttml2/#style-attribute-extent

id: string

The identifier of the cue.

metadata: any

The <metadata> Element of the corresponding TTML document.

regions: Record<string, StylePropertyRecord>

A record of style for the cue. Each entry contains all style properties for a region id.

startTime: number

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

styles: Record<string, StylePropertyRecord>

A record of styles for the cue. Each entry contains all style properties for a style id.

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.

Methods