Module

x/evt/lib/index.ts

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

A single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well.

Properties

enabled: boolean
readonly
id: string
readonly
isolated: boolean
readonly
kind: string
readonly
label: string
readonly
muted: boolean
onended: ((this: MediaStreamTrack, ev: Event) => any) | null
onisolationchange: ((this: MediaStreamTrack, ev: Event) => any) | null
onmute: ((this: MediaStreamTrack, ev: Event) => any) | null
onunmute: ((this: MediaStreamTrack, ev: Event) => any) | null
readonly
readyState: MediaStreamTrackState

Methods

applyConstraints(constraints?: MediaTrackConstraints): Promise<void>
getCapabilities(): MediaTrackCapabilities
getConstraints(): MediaTrackConstraints
getSettings(): MediaTrackSettings
stop(): void
addEventListener<K extends keyof MediaStreamTrackEventMap>(
type: K,
listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof MediaStreamTrackEventMap>(
type: K,
listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void