Issues with SnapCam installed

I have a random issue if snapcam is installed, the browser decides sometimes to publish using the snapchat camera.

Is there way to stop it ever using it?

I’m just creating the publisher like normal:

this.OVPublisher = this.OV.initPublisher("publisher-video", {
          videoSource: true,
          audioSource: true,
          publishAudio: true,
          publishVideo: true,
          frameRate: 30,
          resolution: '1280x720'
        });

At this point though access hasn’t been granted to get media devices, once access has been allowed in the browser i can then filter out the media devices and switch the track?

Is there not a more efficient way? The browser doesn’t ask for permission to access the devices until initPublisher is called, and before then i can’t use getDevices()

The snapcam is so unreliable it breaks things entirely most of the time or just get a yellow screen.

OpenVidu.getDevices method is just a simple wrapper around Web API method MediaDevices.enumerateDevices() - Web APIs | MDN.

This method won’t return a proper result unless the web already has permissions to capture audio/video. So there is no shortcut at this point. Instead of using OpenVidu.initPublisher (which will initialize a Publisher object and setup the video element), you can use instead OpenVidu.getUserMedia. That method will trigger the permissions dialog the same way. You can then dispose the generated MediaStream and now call the getDevices method to finally get a Publisher object with the desire device.