logo

THEOplayer > TextTrackCue

TextTrackCue interface

Inherits from EventDispatcher<TextTrackCueEventMap>. See parent page for inherited properties and methods.

Represents a cue of a text track.

Signature:

export interface TextTrackCue extends EventDispatcher<TextTrackCueEventMap> 

Properties

Property

Type

Description

content

any

The content of the cue.

endTime

number

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

id

string

The identifier of the cue.

startTime

number

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

track

TextTrack

The text track of the cue.

uid

number

A unique identifier of the text track cue.

Property Details

content

The content of the cue.

Signature:

content: any;

Remarks

The content differs depending on the 's :
- 'emsg': Content is a Uint8Array representing the binary message data from the emsg box.
- 'eventstream': Content is the value of the messageData attribute which was specified in the manifest.
- 'ttml': 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.
- 'webvtt': Content is the cue text in raw unparsed form.

endTime

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

Signature:

endTime: number;

id

The identifier of the cue.

Signature:

id: string;

startTime

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

Signature:

startTime: number;

track

The text track of the cue.

Signature:

track: TextTrack;

uid

A unique identifier of the text track cue.

Signature:

readonly uid: number;

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.

github
Make sure to follow us on GitHub!
THEO-logo-white
twitter
facebook
linkedin
Copyright © 2022. All Rights Reserved.
Leuven
New York
Singapore
Barcelona