@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="MediaDevices")
public class MediaDevices
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
@JsNullable 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 |
|---|---|
void |
addDevicechangeListener(EventListener callback) |
void |
addDevicechangeListener(EventListener callback,
AddEventListenerOptions options) |
void |
addDevicechangeListener(EventListener callback,
boolean useCapture) |
@JsNonNull 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.
|
@JsNonNull 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.
|
@JsNonNull 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.
|
@JsNonNull 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.
|
@JsNonNull 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.
|
@JsNonNull 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.
|
void |
removeDevicechangeListener(EventListener callback) |
void |
removeDevicechangeListener(EventListener callback,
boolean useCapture) |
void |
removeDevicechangeListener(EventListener callback,
EventListenerOptions options) |
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListenerassign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, valuespublic @JsNullable EventHandler ondevicechange
public @JsNonNull Promise<JsArray<MediaDeviceInfo>> enumerateDevices()
public @JsNonNull MediaTrackSupportedConstraints getSupportedConstraints()
public @JsNonNull Promise<MediaStream> getUserMedia(@Nonnull MediaStreamConstraints constraints)
public @JsNonNull Promise<MediaStream> getUserMedia()
public @JsNonNull Promise<MediaStream> getDisplayMedia(@Nonnull DisplayMediaStreamConstraints constraints)
public @JsNonNull Promise<MediaStream> getDisplayMedia()
@JsOverlay
public final void addDevicechangeListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addDevicechangeListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addDevicechangeListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeDevicechangeListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeDevicechangeListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeDevicechangeListener(@Nonnull
EventListener callback)