While working on WebRTC or with Simple Peer or with Peer JS, you may want to work with your camera in your application. You might have used navigator.mediaDevices.getUserMedia or navigator.getUserMedia to access the camera from your application. So, when you try to run the application in your browser, the browser will prompt you to give the permission. But, even after giving the permissions to the browser, you may get the error “DOMException: Could not start video source” if it is chrome or “DOMException: Failed to allocated videosource” error message in your console with Mozilla firefox.
This error message is mostly because of your camera is being used by some other application in your system. If you are trying to access the camera only from one browser, then check if the camera is used by other application and close it.
If you want to access the camera multiple times, instead of opening the application in different browsers, you can open it in the same browser. If you try to access the camera in multiple tabs of any browser, you do not get any error, however if you try to access across multiple browsers at a time, you will get the error.