setInputDevicesAsync()

setInputDevicesAsync({ audioDeviceId, videoDeviceId, audioSource, videoSource })

Compatibility:
Prebuilt
Custom

Switch to using a specific local audio device, video device, or both.

Accepts an argument representing the device either as an ID that matches an ID returned by enumerateDevices (audioDeviceId or videoDeviceId), or as a raw MediaStreamTrack object (audioSource or videoSource).

Returns a Promise which resolves with an object containing device info: