Stay organized with collections Save and categorize content based on your preferences.

WebvttCueParser

@UnstableApi
class WebvttCueParser


Parser for WebVTT cues. (https://w3c.github.io/webvtt/#cues)

Summary

Constants

const Pattern!

Public constructors

Public functions

java-static WebvttCueInfo?
parseCue(
    webvttData: ParsableByteArray!,
    styles: (Mutable)List<WebvttCssStyle!>!
)

Parses the next valid WebVTT cue in a parsable array, including timestamps, settings and text.

Constants

CUE_HEADER_PATTERN

const val CUE_HEADER_PATTERNPattern!

Public constructors

WebvttCueParser

WebvttCueParser()

Public functions

parseCue

java-static fun parseCue(
    webvttData: ParsableByteArray!,
    styles: (Mutable)List<WebvttCssStyle!>!
): WebvttCueInfo?

Parses the next valid WebVTT cue in a parsable array, including timestamps, settings and text.

Parameters
webvttData: ParsableByteArray!

Parsable WebVTT file data.

styles: (Mutable)List<WebvttCssStyle!>!

List of styles defined by the CSS style blocks preceding the cues.

Returns
WebvttCueInfo?

The parsed cue info, or null if no valid cue was found.