Amazon Vinyl
    Preparing search index...

    Interface LoadWebVttCuesOptions

    interface LoadWebVttCuesOptions {
        abort?: Maybe<ReadonlyAbort>;
        getCurrentTime: () => number;
        lookAhead?: Maybe<number>;
        lookBehind?: Maybe<number>;
        onCues: (cues: readonly WebVttCue[]) => void;
        onStyles?: Maybe<(styles: readonly string[]) => void>;
        requestInit?: Maybe<Readonly<Omit<RequestInit, "signal">>>;
        variables?: Maybe<Readonly<Record<string, string>>>;
    }
    Index
    getCurrentTime: () => number

    Returns the current playback time (seconds on the presentation timeline). Used to fetch caption segments in a window around the playhead rather than draining the entire playlist up front.

    lookAhead?: Maybe<number>

    Seconds ahead of the playhead to keep buffered. Default 10s.

    lookBehind?: Maybe<number>

    Seconds behind the playhead to keep buffered. Default 2s.

    onCues: (cues: readonly WebVttCue[]) => void

    Invoked with each batch of cues as soon as they are parsed. Called once per HLS segment, or once for a direct .vtt document.

    onStyles?: Maybe<(styles: readonly string[]) => void>

    Invoked with the CSS body of any STYLE blocks parsed from a document. Only called when a document actually declares styles.

    requestInit?: Maybe<Readonly<Omit<RequestInit, "signal">>>
    variables?: Maybe<Readonly<Record<string, string>>>

    HLS EXT-X-DEFINE variables to make available for IMPORT and for substitution of segment URIs when loading from an HLS media playlist.