Event which is fired when a subtitle cue

interface SubtitleCueEvent {
    end: number;
    html?: string;
    image?: string;
    position?: SubtitleCuePosition;
    region?: string;
    regionStyle?: string;
    start: number;
    subtitleId: string;
    text: string;
    timestamp: number;
    type: PlayerEvent;
    vtt?: VTTProperties;
}

Hierarchy (view full)

Properties

end: number

The playback time when the subtitle should be hidden

html?: string

The textual content prepared to be put into a html element

image?: string

Data-URL containing the image data.

Only relevant for CEA-captions, provides information about where the cue should be positioned on a grid of 15 character rows times 32 columns. See https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/608toVTT.html#positioning-in-cea-608 for detailed explanation.

region?: string

The region in which the subtitle should be displayed. Will be filled with information of the region attribute in TTML subtitle cues

regionStyle?: string

The style information of the region in which this subtitle should be displayed. Will be filled with the style information provided in the head of the TTML document if it matches the current cue's region attribute.

start: number

The playback time when the subtitle should be rendered

subtitleId: string

The id of the associated subtitle track defined in id

text: string

The textual content of this subtitle

timestamp: number

The time at which this event was fired

Event type, e.g. 'play'

Options for WebVTT subtitle styling and positioning, including region settings.