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 a text track. TextTrack object properties:
Valeur de l'attribut kind :
|
Support du navigateur
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 9.0 | Non pris en charge | 6.0 | Support |