@ceeblue/web-utils
    Preparing search index...

    Class WebVttParserBeta

    A WebVTT parser.

    {@includeCode ../../test/webvtt/WebVttParser.test.ts#example}
    
    Index

    Constructors

    Properties

    oncue?: (cue: WebVttCue) => void

    A callback function that is called when a cue is parsed.

    onflush?: () => void

    A callback function that is called when the parser is flushed.

    onparsingerror?: (error: WebVttParsingError) => void

    A callback function that is called when a parsing error occurs.

    onregion?: (region: WebVttRegion) => void

    A callback function that is called when a region is parsed.

    onstyle?: (style: string) => void

    A callback function that is called when a style is parsed.

    ontimestampmap?: (timestampMap: TimestampMap) => void

    A callback function that is called when a timestamp map is parsed.

    Methods

    • Beta

      Flush the parser.

      Returns WebVttParser

      The parser.

    • Beta

      Parse the given data.

      Parameters

      • Optionaldata: string

        The data to parse.

      • OptionalreuseCue: boolean

        Whether to reuse the cue.

      Returns WebVttParser

      The parser.