Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MediaDevices

Package version

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.

Hierarchy

Index

Properties

EventTarget

EventTarget: { constructor: any; prototype: EventTarget }

Type declaration

  • constructor: function
    • Returns EventTarget

  • prototype: EventTarget

ondevicechange

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

Methods

addEventListener

dispatchEvent

  • 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

    Returns boolean

enumerateDevices

  • Returns Promise<MediaDeviceInfo[]>

getSupportedConstraints

  • Returns MediaTrackSupportedConstraints

getUserMedia

  • Parameters

    Returns Promise<MediaStream>

removeEventListener

Generated using TypeDoc