logo

THEOplayer > TextTrackDescription

TextTrackDescription interface

Describes the configuration of a side-loaded text track.

Signature:

export interface TextTrackDescription 

Properties

Property

Type

Description

default (optional)

boolean

Whether the text track should be enabled by default.

format (optional)

string

The format of the track, represented by a value from the following list:
- 'srt'
- 'ttml'
- 'webvtt'
- 'emsg'
- 'eventstream'
- 'id3'
- 'cea608'
- 'daterange'

kind (optional)

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.

label (optional)

string

A label for the text track.

src

string

The source URL of the text track.

srclang (optional)

string

The language of the text track.

Property Details

default

Whether the text track should be enabled by default.

Signature:

default?: boolean;

Remarks


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

format

The format of the track, represented by a value from the following list:
- 'srt'
- 'ttml'
- 'webvtt'
- 'emsg'
- 'eventstream'
- 'id3'
- 'cea608'
- 'daterange'

Signature:

format?: string;

kind

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.

Signature:

kind?: string;

Remarks


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

label

A label for the text track.

Signature:

label?: string;

Remarks


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

src

The source URL of the text track.

Signature:

src: string;

srclang

The language of the text track.

Signature:

srclang?: string;
github
Make sure to follow us on GitHub!
THEO-logo-white
twitter
facebook
linkedin
Copyright © 2020. All Rights Reserved.
Leuven
New York
Singapore
Barcelona