W3cubDocs

/Haxe JavaScript

MediaDevices

package js.html

extends EventTarget

Available on js

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 also:

Variables

ondevicechange: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.

Methods

enumerateDevices():Promise<Array<MediaDeviceInfo>>

Throws:

null

DOMError

getSupportedConstraints():MediaTrackSupportedConstraints

getUserMedia(?constraints:Null<MediaStreamConstraints>):Promise<MediaStream>

Throws:

null

DOMError

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/MediaDevices.html