HTML Audio/Video DOM textTracks Property
Example
var vid = document.getElementById("myVideo");
function myFunction() {
alert(vid.textTracks.length);
}
Meaning
The textTracks property returns a TextTrackList object representing the available text tracks.
Note: The first available TextTrack object is index 0.
Standard Syntax
audio|video.textTracks
Advertisement
Return Value
| Type | Description |
|---|---|
| TextTrackList Object | Returns the available text tracks for the the audio/video.
|
| TextTrack Object | Returns an text track.
|