fixed bug where changing speaker did not stick
This commit is contained in:
parent
ea1fac4ebc
commit
ed5fe776fc
|
|
@ -18,6 +18,8 @@ export const DeviceSelect = () => {
|
||||||
return <div>Loading devices...</div>;
|
return <div>Loading devices...</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(currentDevices);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Field label="Select camera:">
|
<Field label="Select camera:">
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ export const useDevices = (callObject) => {
|
||||||
async (newSpeakers, useLocalStorage = true) => {
|
async (newSpeakers, useLocalStorage = true) => {
|
||||||
if (
|
if (
|
||||||
!callObject ||
|
!callObject ||
|
||||||
newSpeakers.deviceId === currentDevices?.speakers?.deviceId
|
newSpeakers.deviceId === currentDevices?.speaker?.deviceId
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -242,7 +242,7 @@ export const useDevices = (callObject) => {
|
||||||
outputDeviceId: newSpeakers.deviceId,
|
outputDeviceId: newSpeakers.deviceId,
|
||||||
});
|
});
|
||||||
|
|
||||||
setCurrentDevices((prev) => ({ ...prev, speakers: newSpeakers }));
|
setCurrentDevices((prev) => ({ ...prev, speaker: newSpeakers }));
|
||||||
},
|
},
|
||||||
[callObject, currentDevices]
|
[callObject, currentDevices]
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue