setAudioDevice(deviceId)
Switches the local audio stream to the device identified by deviceId. The deviceId should match a deviceId value returned by enumerateDevices().
If the requested device becomes unavailable (for example, a Bluetooth device that disconnects), the resolved deviceId may differ from the one requested.
Parameters
The
deviceId of the audio device to switch to.Return value
Returns aPromise<{ deviceId: string }> with the deviceId of the audio device that was actually applied.