Module

x/evt/lib/index.ts

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

Used to represent a list of the video tracks contained within a element, with each track represented by a separate VideoTrack object in the list.

Properties

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

Methods

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