HTML Audio/Video DOM textTracks property
Example
Get the number of available text tracks:
myVid=document.getElementById("video1"); alert(myVid.textTracks.length);
Definition and usage
The textTracks property returns a TextTrackList object.
The TextTrackList object represents the available text tracks of the audio/video.
Each available text track is represented by a TextTrack object.
Browser support
The textTracks property is not supported by all mainstream browsers.
Syntax
audio|video.textTracks
Return value
Type | Description |
---|---|
TextTrackList object |
Represents the available text tracks of the audio/video Properties of TextioTrackList object:
Note:The index of the first available text track is 0. |
TextTrack object |
Represents a text track. Properties of TextTrack object:
|