getUserMedia(constraints)
Retrieves the media stream from the local media device and returns it to the application.
This function is similar to MediaDevices.getUserMedia().
Parameters¶
| Name | Description |
|---|---|
constraints |
(Required) An object specifying the details of the media stream. More info |
Return Values¶
| Type | Description |
|---|---|
| Promise | Resolves to a MediaStream or rejects with a related DOMException |
Code Example¶
let _stream = await HorizonWebRtcRedirectionAPI.getUserMedia(_constraints);