@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="MediaDevices")
public class MediaDevices
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
EventHandler |
ondevicechange
The MediaDevices.ondevicechange property is an EventHandler which specifies a function to be called when the devicechange event occurs on a MediaDevices instance.
|
| Modifier | Constructor and Description |
|---|---|
protected |
MediaDevices() |
| Modifier and Type | Method and Description |
|---|---|
Promise<JsArray<MediaDeviceInfo>> |
enumerateDevices()
The MediaDevices method enumerateDevices() requests a list of the available media input and output devices, such as microphones, cameras, headsets, and so forth.
|
Promise<MediaStream> |
getDisplayMedia()
The MediaDevices interface's getDisplayMedia() method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a MediaStream.
|
Promise<MediaStream> |
getDisplayMedia(DisplayMediaStreamConstraints constraints)
The MediaDevices interface's getDisplayMedia() method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a MediaStream.
|
MediaTrackSupportedConstraints |
getSupportedConstraints()
The getSupportedConstraints() method of the MediaDevices interface returns an object based on the MediaTrackSupportedConstraints dictionary, whose member fields each specify one of the constrainable properties the user agent understands.
|
Promise<MediaStream> |
getUserMedia()
The MediaDevices.getUserMedia() method prompts the user for permission to use a media input which produces a MediaStream with tracks containing the requested types of media.
|
Promise<MediaStream> |
getUserMedia(MediaStreamConstraints constraints)
The MediaDevices.getUserMedia() method prompts the user for permission to use a media input which produces a MediaStream with tracks containing the requested types of media.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListener@Nullable public EventHandler ondevicechange
@Nonnull public Promise<JsArray<MediaDeviceInfo>> enumerateDevices()
@Nonnull public MediaTrackSupportedConstraints getSupportedConstraints()
@Nonnull public Promise<MediaStream> getUserMedia(@Nonnull MediaStreamConstraints constraints)
@Nonnull public Promise<MediaStream> getUserMedia()
@Nonnull public Promise<MediaStream> getDisplayMedia(@Nonnull DisplayMediaStreamConstraints constraints)
@Nonnull public Promise<MediaStream> getDisplayMedia()