THEOplayer Web SDK
    Preparing search index...

    Interface TextTrackDescription

    Describes the configuration of a side-loaded text track.

    interface TextTrackDescription {
        default?: boolean;
        format?: "" | "srt" | "ttml" | "webvtt";
        kind?: string;
        label?: string;
        src: string;
        srclang?: string;
    }
    Index

    Properties

    default?: boolean

    Whether the text track should be enabled by default.


    - Only one text track per TextTrack.kind may be marked as default.

    false

    format?: "" | "srt" | "ttml" | "webvtt"

    The format of the track, represented by a value from the following list:
    - 'srt': The track contains SRT (SubRip Text) content.
    - 'ttml': The track contains TTML (Timed Text Markup Language) content.
    - 'webvtt': The track contains WebVTT (Web Video Text Tracks) content.
    - '' (default): The format is auto-detected based on its content.

    ''

    kind?: string

    The kind of the text track, represented by a value from the following list:
    - 'subtitles': The track provides subtitles, used to display subtitles in a video.
    - 'captions': The track provides a translation of dialogue and sound effects (suitable for users with a hearing impairment).
    - 'descriptions': The track provides a textual description of the video (suitable for users with a vision impairment).
    - 'chapters': The track provides chapter titles (suitable for navigating the media resource).
    - 'metadata': The track provides content used by scripts and is not visible for users.


    - If an unrecognized value is provided, the player will interpret it as 'metadata'.

    'subtitles'

    label?: string

    A label for the text track.


    - This will be used as an identifier on the player API and in the UI.

    src: string

    The source URL of the text track.

    srclang?: string

    The language of the text track.