Video textTracks Property
Example
Get the number of available text tracks:
var x = document.getElementById("myVideo").textTracks.length;
Try it Yourself »
Description
The textTracks property returns a TextTrackList object.
The TextTrackList object represents the available text tracks for the video.
Each available text track is represented by a TextTrack Object.
Browser Support
Property | |||||
---|---|---|---|---|---|
textTracks | Yes | 9.0 | Not supported | 6.0 | Yes |
Syntax
videoObject.textTracks
Return Value
Type | Description |
---|---|
TextTrackList Object | Represents the available text tracks for the the video. TextioTrackList Object:
Note: The first available TextTrack object is index 0 |
TextTrack Object | Represents a text track. TextTrack Object Properties:
|
❮ Video Object