Options
All
  • Public
  • Public/Protected
  • All
Menu

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. Available only in secure contexts.

Hierarchy

  • EventTarget
    • MediaDevices

Index

Properties

ondevicechange: null | ((this: internal.MediaDevices, ev: Event) => any)

Methods

  • addEventListener<K>(type: K, listener: ((this: internal.MediaDevices, ev: MediaDevicesEventMap[K]) => any), options?: boolean | AddEventListenerOptions): void
  • addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
  • Type Parameters

    • K extends "devicechange"

    Parameters

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • dispatchEvent(event: Event): boolean
  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    • event: Event

    Returns boolean

  • removeEventListener<K>(type: K, listener: ((this: internal.MediaDevices, ev: MediaDevicesEventMap[K]) => any), options?: boolean | EventListenerOptions): void
  • removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void
  • Type Parameters

    • K extends "devicechange"

    Parameters

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

Generated using TypeDoc