Easy Tutorial
❮ Att A Name Att Font Color ❯

HTML Audio/Video DOM addTextTrack() Method

HTML Audio/Video DOM Reference Manual

Example

Add a new text track to the video:


Definition and Usage

The addTextTrack() method creates and returns a new TextTrack object.

The new TextTrack object is added to the text track list of the audio/video element.


Browser Support

None of the major browsers support the addTextTrack() method.


Syntax

Parameters

Value Description
kind Specifies the type of the text track. Possible values: "subtitles"<br> "captions"<br> "descriptions"<br> "chapters"<br>  "metadata"
label A string value that specifies the label for the text track. Used to identify the text track for the user.
language A two-letter language code that specifies the language of the text track. <br>For a list of all available language codes, see our Language Code Reference Manual

Return Value

Type Description
TextTrack Object Represents the new text track.

❮ Att A Name Att Font Color ❯