interface dom.MediaStream
implements EventTarget
import { type dom } from "https://deno.land/x/evt@v2.4.16/lib/types/index.ts";
const { MediaStream } = dom;
A stream of media content. A stream consists of several tracks such as video or audio tracks. Each track is specified as an instance of MediaStreamTrack.
Properties
onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null
onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null
Methods
addTrack(track: MediaStreamTrack): void
clone(): MediaStream
getAudioTracks(): MediaStreamTrack[]
getTrackById(trackId: string): MediaStreamTrack | null
getTracks(): MediaStreamTrack[]
getVideoTracks(): MediaStreamTrack[]
removeTrack(track: MediaStreamTrack): void
addEventListener<K extends keyof MediaStreamEventMap>(): void
type: K,
listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof MediaStreamEventMap>(): void
type: K,
listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any,
options?: boolean | EventListenerOptions,