AwaitedDOM/ AudioTrack

The AudioTrack interface represents a single audio track from one of the HTML media elements, <audio> or <video>. The most common use for accessing an AudioTrack object is to toggle its enabled property in order to mute and unmute the track.

Properties

.enabled
W3C

A Boolean value which controls whether or not the audio track's sound is enabled. Setting this value to false mutes the track's audio.

Type: Promise<boolean>

.id
W3C

A string which uniquely identifies the track within the media. This ID can be used to locate a specific track within an audio track list by calling AudioTrackList.getTrackById(). The ID can also be used as the fragment part of the URL if the media supports seeking by media fragment per the Media Fragments URI specification.

Type: Promise<string>

.kind
W3C

A string specifying the category into which the track falls. For example, the main audio track would have a kind of "main".

Type: Promise<string>

.label
W3C

A string providing a human-readable label for the track. For example, an audio commentary track for a movie might have a label of "Commentary with director John Q. Public and actors John Doe and Jane Eod." This string is empty if no label is provided.

Type: Promise<string>

.language
W3C

A string specifying the audio track's primary language, or an empty string if unknown. The language is specified as a BCP 47 (RFC 5646) language code, such as "en-US" or "pt-BR".

Type: Promise<string>

Edit this page on GitHub