Audio textTracks Property
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 for the audio.
Each available text track is represented by an 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
audioObject.textTracks
Return Value
Type | Description |
---|---|
TextTrackList Object | Represents the available text tracks for the the audio. TextioTrackList Object:
Note: The first available TextTrack object is index 0 |
TextTrack Object | Represents a text track. TextTrack Object Properties:
|
Audio Object