Skip to content

Type Alias: WebVttParserOptions ​

ts
type WebVttParserOptions = object;

Defined in: libs/webvtt/src/WebVttParserOptions.ts:9

Options for the WebVtt parser.

Properties ​

createCue? ​

ts
createCue?: WebVttCueFactory;

Defined in: libs/webvtt/src/WebVttParserOptions.ts:29

A factory for creating WebVttCue objects.

By default the parser will create DOM VTTCue objects for each cue. In some environments, like node or a web worker, this class does not exist. In this case, you can provide a custom factory function that creates a custom cue object.

See ​

VTTCue


createRegion? ​

ts
createRegion?: WebVttRegionFactory;

Defined in: libs/webvtt/src/WebVttParserOptions.ts:41

A factory for creating WebVttRegion objects.

By default the parser will create DOM VTTRegion objects for each region. In some environments, like node or a web worker, this class does not exist. In this case, you can provide a custom factory function that creates a custom region object.

See ​

VTTRegion


useDomTypes? ​

ts
useDomTypes?: boolean;

Defined in: libs/webvtt/src/WebVttParserOptions.ts:17

Whether to use DOM VTTCue and VTTRegion or generic objects. If createCue or createRegion are provided, they will be used instead of the default factory functions.

Default Value ​

true

A Streaming Video Technology Alliance project.