Interface MediaDevices

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.

MDN Reference

Hierarchy

Properties

ondevicechange: ((this, ev) => any)

Type declaration

Methods

  • 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.

    MDN Reference

    Parameters

    Returns boolean

  • Type Parameters

    • K extends "devicechange"

    Parameters

    Returns void

  • Parameters

    Returns void