diff --git a/dailyjs/shared/components/DeviceSelect/DeviceSelect.js b/dailyjs/shared/components/DeviceSelect/DeviceSelect.js index c089280..3fba799 100644 --- a/dailyjs/shared/components/DeviceSelect/DeviceSelect.js +++ b/dailyjs/shared/components/DeviceSelect/DeviceSelect.js @@ -18,6 +18,8 @@ export const DeviceSelect = () => { return
Loading devices...
; } + console.log(currentDevices); + return ( <> diff --git a/dailyjs/shared/contexts/useDevices.js b/dailyjs/shared/contexts/useDevices.js index 9c3b6d6..fb4ec20 100644 --- a/dailyjs/shared/contexts/useDevices.js +++ b/dailyjs/shared/contexts/useDevices.js @@ -227,7 +227,7 @@ export const useDevices = (callObject) => { async (newSpeakers, useLocalStorage = true) => { if ( !callObject || - newSpeakers.deviceId === currentDevices?.speakers?.deviceId + newSpeakers.deviceId === currentDevices?.speaker?.deviceId ) { return; } @@ -242,7 +242,7 @@ export const useDevices = (callObject) => { outputDeviceId: newSpeakers.deviceId, }); - setCurrentDevices((prev) => ({ ...prev, speakers: newSpeakers })); + setCurrentDevices((prev) => ({ ...prev, speaker: newSpeakers })); }, [callObject, currentDevices] );