Welcome to the new Daily Docs. Please let us know what you think.

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: