steep-balloon-41261
10/20/2022, 10:29 AMshy-sandwich-47644
10/20/2022, 12:44 PMroom.switchActiveDevice ?
e.g
room.switchActiveDevice('audioinput', '')
Note: You can also pass the deviceId which can be captured via await Room.getLocalDevices('audioinput') .
Ref: https://github.com/livekit/client-sdk-js#device-management-apiswitty-vr-13117
10/20/2022, 1:05 PMshy-sandwich-47644
10/20/2022, 1:57 PMawait Room.getLocalDevices('audioinput') ?shy-sandwich-47644
10/20/2022, 2:12 PMwitty-vr-13117
10/20/2022, 3:06 PMdefault or '' but didnt switch the device
and your default device is a audiooutput. output works perfectly input not working real-timeshy-sandwich-47644
10/20/2022, 3:24 PMnavigator.mediaDevices.enumerateDevices at https://github.com/livekit/client-sdk-js/blob/main/src/room/DeviceManager.ts#L36, just adding the default at the top:
https://github.com/livekit/client-sdk-js/blob/main/src/room/DeviceManager.ts#L68
I think that's the bug, if we call the Room.getLocalDevices without any input params, it will keep the first one and remove the other defaults.shy-sandwich-47644
10/20/2022, 3:28 PMRoom.getLocalDevices without any input params and see if it's matching the response of navigator.mediaDevices.enumerateDevices .witty-vr-13117
10/20/2022, 5:15 PMshy-sandwich-47644
10/20/2022, 7:40 PMdefault deviceId is missing from Room.getLocalDevices .
cc: @dry-elephant-14928dry-elephant-14928
10/22/2022, 5:54 PM