steep-balloon-41261
10/27/2022, 3:16 PMdry-elephant-14928
10/27/2022, 10:47 PMroom instances. Try disabling StrictMode in react to see if that goes away.
FWIW, our react components should work fine with strict mode. Are you using those or is this custom?narrow-action-3234
10/28/2022, 6:19 AM<LiveKitRoom> component and I’ve debugged it thinking maybe is something from me but also on the connected function that returns the room u’ve been connected onConnected?: (room: Room) => void; manually disabling camera permissions or microphone not working as expected having them both turned off just giving me if I remember right only one error not for bothnarrow-action-3234
10/28/2022, 6:24 AMWhat I did for solving this is below:
room.on(RoomEvent.MediaDevicesError, async () => {
const browser = getBrowser();
if (browser !== "Firefox" && browser !== "Safari") {
const queryPromises = ["camera", "microphone"].map((name: any) =>
navigator.permissions.query({
name: name,
})
);
for await (const status of queryPromises) {
const perm: any = status;
if (perm.name === "video_capture" && perm.state === "denied") {
setPermissions((prev) => ({
...prev,
camera: false,
}));
}
if (perm.name === "audio_capture" && perm.state === "denied") {
setPermissions((prev) => ({
...prev,
audio: false,
}));
}
}
setPermissionsDenied(true);
}
});