Easy Tutorial
❮ Event Onpause Prop Doc Url ❯

Audio addTextTrack() Method

Audio Object

Example

Add a new text track to the audio:


Definition and Usage

The addTextTrack() method is used to create and return a new text track.

The new TextTrack object is added to the audio element's text track list.


Browser Support

Currently, all major browsers do not support the addTextTrack() method.


Syntax

Parameter Values

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. For a list of all available language codes, see our Language Code Reference.

Technical Details

| Return Value: | A TextTrack object, representing the new text track. | | --- | --- |

❮ Event Onpause Prop Doc Url ❯