Interface EventStreamCue

Represents a cue of an Event Stream metadata text track.

interface EventStreamCue {
    attributes: {
        [attributeName: string]: string;
    };
    content: any;
    endTime: number;
    eventID: string;
    id: string;
    startTime: number;
    track: TextTrack;
    uid: number;
    addEventListener<TType>(type, listener): void;
    removeEventListener<TType>(type, listener): void;
}

Hierarchy (view full)

Properties

attributes: {
    [attributeName: string]: string;
}

The attributes of the cue.

Type declaration

  • [attributeName: string]: string

Remarks


- The attributes are parsed from the XML tags in the manifest, where the tag names are the keys and the values are the contents of the respective tags.

content: any

The content of the cue.

Remarks

The content differs depending on the TextTrackCue.track's type:
- '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: number

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

eventID: string

The identifier of the event.

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.

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

Generated using TypeDoc