Easy Tutorial
❮ Prop Style Emptycells Event Onloadeddata ❯

Audio textTracks Property

Audio Object

Example

Get the number of available text tracks:


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 a TextTrack object.


Browser Support

Internet Explorer, Opera, Chrome, and Safari 6 support the textTracks property.

Note: Firefox and Internet Explorer 9 and earlier versions do not support the textTracks property.


Syntax

Return Value

Type Description
TextTrackList object Represents the available text tracks for the audio. Properties of the TextTrackList object: length - Gets the number of available text tracks in the audio<br> [index] - Gets a TextTrack object by index. Note: The index of the first available text track is 0.
TextTrack object Represents a single text track. Properties of the TextTrack object: kind - Gets the type of the text track (can be "subtitles", "captions", "descriptions", "chapters", or "metadata")<br> label - Gets the label of the text track<br> language - Gets the language of the text track<br> mode - Gets or sets whether the track is active ("disabled" "hidden" "showing")<br> cues - Gets the TextTrackCueList object's cues list<br> activeCues - Gets the current active text track cues in the form of a TextTrackCueList object<br> addCue(cue) - Adds a cue to the cues list<br> removeCue(cue) - Removes a cue from the cues list

❮ Prop Style Emptycells Event Onloadeddata ❯