HTML Audio/Video DOM addTextTrack() Method
HTML Audio/Video DOM Reference
Example
Add a new text track to a video:
text1=myVid.addTextTrack("caption");
text1.addCue(new TextTrackCue("Test text", 01.000, 04.000,"","","",true));
Try it »
Definition and Usage
The addTextTrack() method creates and returns a new TextTrack object.
The new TextTrack object is added to the list of text tracks of the video/audio element.
Browser support





No major browsers support the addTextTrack() method.
Syntax
audio|video
.addTextTrack(
kind
,
label
,
language
)
Parameters
| Value | Description |
|---|---|
| kind | Specifies the type of the text track.
Possible values: |
Return Value
| Type | Description |
|---|---|
| TextTrack object | Represents the new text track. |
HTML Audio/Video DOM Reference