Video textTracks Property
Example
Get the number of available text tracks:
var x = document.getElementById("myVideo").textTracks.length;
Try it yourself »
Definition and Usage
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
The textTracks property is supported in Internet Explorer, Opera, Chrome, and Safari 6.
Note: The textTracks property is not supported in Firefox and Internet Explorer 9 and earlier versions.
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