logo

THEOplayer > WebVTTCue

WebVTTCue interface

Inherits from TextTrackCue . See parent page for inherited properties and methods.

Represents a cue of a WebVTT text track.

Signature:

export interface WebVTTCue extends TextTrackCue 

Properties

Property

Type

Description

align

VTTAlignSetting

The text alignment of the cue.

content

string

The content of the cue in raw unparsed form.

line

VTTLine

The line offset of the cue.

lineAlign

VTTLineAlignSetting

The line alignment of the cue.

position

VTTPosition

The position of the cue.

positionAlign

VTTPositionAlignSetting

The position alignment of the cue.

region

WebVTTRegion | null

The region of the cue.

size

number

The size of the cue's box.

snapToLines

boolean

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

text

string

The text of the cue in raw unparsed form.

vertical

VTTDirectionSetting

The writing direction of the cue.

Property Details

align

The text alignment of the cue.

Signature:

align: VTTAlignSetting;

content

The content of the cue in raw unparsed form.

Signature:

content: string;

line

The line offset of the cue.

Signature:

line: VTTLine;

lineAlign

The line alignment of the cue.

Signature:

lineAlign: VTTLineAlignSetting;

position

The position of the cue.

Signature:

position: VTTPosition;

positionAlign

The position alignment of the cue.

Signature:

positionAlign: VTTPositionAlignSetting;

region

The region of the cue.

Signature:

region: WebVTTRegion | null;

size

The size of the cue's box.

Signature:

size: number;

Remarks


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

snapToLines

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

Signature:

snapToLines: boolean;

Remarks


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

text

The text of the cue in raw unparsed form.

Signature:

text: string;

vertical

The writing direction of the cue.

Signature:

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