Why is the camera and microphone not working?

I get occasional errors when I try to turn on the camera or microphone. Example on the screenshot. But periodically everything works fine. Also, when I try to turn on the camera, I get: “Error at new Gt (…//web-cdn.jitsi.net/meetjitsi_6943.3715/libs/lib-jitsi-meet.min.js?v=6943.3715:2:306102) at ‘…//web-cdn.jitsi.net/meetjitsi_6943.3715/libs/lib-jitsi-meet.min.js?v=6943.3715:2:588990’”. I use the JITSI API (meet.jit.si/external_api.js).

I have the same issue :sob:

Do you have a simple example code using the API with which you repro the problem?

yes, here is the joining function:

let api;
const joinEventHandler = () => {
let domain = ‘meet.jit.si’;
let options = {…};
api = new JitsiMeetExternalAPI(domain, options);
api.addListener(‘videoConferenceLeft’, conferenceLeftListener);
api.addListener(‘videoConferenceJoined’, conferenceJoinedHandler);
api.addListener(‘chatUpdated’, chatUpdatedHandler);

in head of page I using this script : " <script src=‘https://meet.jit.si/external_api.js’></script>"

And you get the error when you try to unmute in the UI?

What is the content of conferenceJoinedHandler

When the conference starts, I can turn on/off the camera and microphone, but often during the meeting itself, it becomes impossible to turn on the camera, these errors appear. And after restarting the computer, you can turn on the camera again, but after a while these errors appear again. I tried on different devices, the situation does not change. Here is the conferenceJoinedHandler:

    const conferenceJoinedHandler = () => {
        if (startActiveMicro) {
        if (startActiveCamera) {

I’m just checking here, if the user wants to turn on the camera before the conference, I turn it on using the appropriate command.

@damencho, hi. Can you kindly assist me with this problem? I can not detect the reason for this issue, so was wandering is it Jirsi side one.

I suspect you are toggling too early, before the devices finished initializing.

The problem is that for example for the first time I can turn on the camera, then I, for example, turn it off and when I try to turn it on again - I get the error, which is described above.

Also today I got the following error:

And I also noticed that if I often toggle the camera by button in interface, the camera turns off and does not turn on (I get the above errors). And even if I don’t leave the room, after some time (3-5 minutes) I can turn on the camera again. Can you tell me what’s wrong here, please?

I just tested this example jitsi-meet/api.html at master · jitsi/jitsi-meet · GitHub
by adding after line 18 :

            const conferenceJoinedHandler = () => {
            api.addListener('videoConferenceJoined', conferenceJoinedHandler);

And everything works as expected, I do not see the errors you are seeing.
Can you try this way using that example with those lines added, do you still experience the issue?

I gated with this example this example jitsi-meet/api.html at master · jitsi/jitsi-meet · GitHub, the meeting started, everything is ok. When I started to toggle the camera, it turned off and this error appeared in the console:

Do you reproduce the problem on another machine?

This sounds like device issue

So I tried on a Mac device, and on Windows, everything works fine on a Mac, but I have the same problem on Windows. At the same time, he uses several Windows devices, and this problem occurs there.