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
. Astring
indicating the ID of the track to locate within the track list.
Returns: AudioTrack
Unimplemented Specs
Properties
onaddtrack | onchange |
onremovetrack |
Methods
addEventListener() | dispatchEvent() |
removeEventListener() |