WebRTCMediaDevices
Subset of the MediaDevices interface actually used by the SDK.
Implementations only need to provide these methods — the full browser
MediaDevices type is intentionally not required so that React Native
and other non-browser environments can conform without polyfilling
unused APIs.
Methods
addEventListener()
Parameters
type
Event type to listen for.
listener
Listener invoked when the event fires.
Returns
void
enumerateDevices()
Returns
Promise<MediaDeviceInfo[]>
getDisplayMedia()?
Parameters
options
Options to pass to getDisplayMedia.
Returns
Promise<MediaStream>
getUserMedia()
Parameters
constraints
Media-track constraints to pass to getUserMedia.
Returns
Promise<MediaStream>
removeEventListener()
Parameters
type
Event type to listen for.
listener
Listener invoked when the event fires.
Returns
void