interface MediaDevices
implements EventTarget
import { type MediaDevices } from "https://deno.land/x/evt@v2.5.3/lib/types/lib.dom.ts";
Provides access to connected media input devices like cameras and microphones, as well as screen sharing. In essence, it lets you obtain access to any hardware source of media data.
Properties
ondevicechange: ((this: MediaDevices, ev: Event) => any) | null
Methods
enumerateDevices(): Promise<MediaDeviceInfo[]>
getSupportedConstraints(): MediaTrackSupportedConstraints
getUserMedia(constraints?: MediaStreamConstraints): Promise<MediaStream>
addEventListener<K extends keyof MediaDevicesEventMap>(): void
type: K,
listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof MediaDevicesEventMap>(): void
type: K,
listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any,
options?: boolean | EventListenerOptions,