@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    A text track (subtitles, captions, chapters, etc.) associated with a media source.

    Maps to the HTML <track> element attributes.

    const track: MediaTrack = {
    kind: 'subtitles',
    src: '/subs/en.vtt',
    srcLang: 'en',
    label: 'English',
    default: true,
    };
    interface MediaTrack {
        default?: boolean;
        kind: MediaTrackKind;
        label?: string;
        src: string;
        srcLang?: string;
    }
    Index

    Properties

    default?: boolean

    Whether this track should be active by default.

    The kind of text track.

    label?: string

    Human-readable label shown in track selection UI.

    src: string

    URL of the track file (typically WebVTT .vtt).

    srcLang?: string

    BCP 47 language tag (e.g. 'en', 'fr').