Video textTracks attribute
Definition and usage
textTracks
The property returns a TextTrackList object.
The TextTrackList object represents the available text tracks of the video.
Each available text track is represented by a TextTrack object.
Example
Get the number of available text tracks:
var x = document.getElementById("myVideo").textTracks.length;
Syntax
videoObject.textTracks
Return value
Type | Description |
---|---|
TextTrackList object |
Represents the available text tracks of the video. TextioTrackList object:
Note:The first available TextTrack object is at index 0. |
TextTrack object |
Represents the text track. TextTrack object properties:
The value of the kind attribute:
|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 9.0 | Not Supported | 6.0 | Support |