Definition of a text track.

interface TextTrack {
    id: string;
    isFragmented?: boolean;
    isSideloaded?: boolean;
    kind: string;
    label: string;
    lang: string;
    role?: MediaTrackRole[];
    url?: string;
}

Hierarchy (view full)

Properties

id: string

The id of the media track that is used to identify and set the track.

isFragmented?: boolean

Indicates whether the subtitle is fragmented.

isSideloaded?: boolean

Indicates whether the subtitle is sideloaded, i.e. it has been added through PlayerSubtitlesAPI.add or SourceConfig.subtitleTracks.

Since

8.177.0

kind: string

The subtitle type, either "caption" or "subtitle" (default: "subtitle").

label: string

The text used to represent this track to the user (e.g. in the UI).

lang: string

The language of the subtitle/caption track.

The optional roles of the track.

url?: string

The URL to the associated file.