MediaDevices

EventTargetjs.html.MediaDevices (extern class)

The MediaDevices interface 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.

Documentation MediaDevices by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Instance Members

ondevicechange: haxe.Function

The event handler for the devicechange event. This event is delivered to the MediaDevices object when a media input or output device is attached to or removed from the user's computer.


getSupportedConstraints(): MediaTrackSupportedConstraints
Returns
MediaTrackSupportedConstraints

enumerateDevices(): js.lib.Promise<Array<MediaDeviceInfo>>
Returns
js.lib.Promise<Array<MediaDeviceInfo>>

Name Type Default
constraints Null<MediaStreamConstraints> (optional)
Returns
js.lib.Promise<MediaStream>