Audio textTracksProperty
Example
Get the number of available text tracks:
var x =
document.getElementById("myAudio").textTracks.length;
Try it yourself »
Definition and Usage
The textTracks property returns a TextTrackList object.
The TextTrackList object represents the available text tracks of the audio.
Each available text track is represented by a TextTrack object.
Browser Support
![]()
![]()
![]()
![]()
![]()
Internet Explorer, Opera, Chrome, and Safari 6 browsers support the textTracks property.
Note:Firefox and Internet Explorer 9 and earlier IE versions do not support the textTracks property.
Syntax
audioObject.textTracks
Return Value
| Type | Description |
|---|---|
| TextTrackList object |
Represents the available text tracks of the audio. Properties of the TextTrackList object:
Note:The index of the first available text track is 0. |
| TextTrack object |
Represents a text track. Properties of the TextTrack object:
|
Audio Object
Other Extensions