Audio textTracks attribute
Definition and usage
textTracks
The 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.
Example
Get the number of available text tracks:
var x = document.getElementById("myAudio").textTracks.length;
Syntax
audioObject.textTracks
Return value
Type | Description |
---|---|
TextTrackList object |
Represents the available text tracks of the audio. Properties of the TextTrackList object:
Note:The first available TextTrack object is at index 0. |
TextTrack object |
Represents the text track. Properties and methods of the TextTrack object:
Possible values for the 'kind' attribute:
|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |