AwaitedDOM/ AudioTrackList

The AudioTrackList interface is used to represent a list of the audio tracks contained within a given HTML media element, with each track represented by a separate AudioTrack object in the list.
Retrieve an instance of this object with HTMLMediaElement.audioTracks. The individual tracks can be accessed using array syntax.

Properties

.length
W3C

The number of tracks in the list.

Type: Promise<number>

Methods

.getTrackById(id)
W3C

Returns the AudioTrack found within the AudioTrackList whose id matches the specified string. If no match is found, null is returned.

Arguments:

  • id string. A string indicating the ID of the track to locate within the track list.

Returns: AudioTrack

Unimplemented Specs

Properties

onaddtrackonchange
onremovetrack

Methods

addEventListener()dispatchEvent()
removeEventListener()

Edit this page on GitHub