Module

x/evt/lib/index.ts>dom.AudioTrackList

šŸ’§EventEmitter's typesafe replacement
Go to Latest
interface dom.AudioTrackList
implements EventTarget
import { type dom } from "https://deno.land/x/evt@v2.3.1/lib/index.ts";
const { AudioTrackList } = dom;

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.

Properties

readonly
length: number
onaddtrack: ((this: AudioTrackList, ev: TrackEvent) => any) | null
onchange: ((this: AudioTrackList, ev: Event) => any) | null
onremovetrack: ((this: AudioTrackList, ev: TrackEvent) => any) | null

Methods

getTrackById(id: string): AudioTrack | null
item(index: number): AudioTrack
addEventListener<K extends keyof AudioTrackListEventMap>(
type: K,
listener: (this: AudioTrackList, ev: AudioTrackListEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof AudioTrackListEventMap>(
type: K,
listener: (this: AudioTrackList, ev: AudioTrackListEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void