Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/website/awaited-dom/AudioTrackList.md
1028 views

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 {#length}

The number of tracks in the list.

Type: Promise<number>

Methods

.getTrackById*(id)*
W3C {#getTrackById}

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()