This message was deleted.
# helpdesk
s
This message was deleted.
d
that's possible you are looking at different
room
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?
n
Hi @dry-elephant-14928… Yes, I’m using the
<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 both
Copy code
What 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);
  }
});