Back

Technologies:

javascriptjavascript
node.jsnode.js
avatar
Tolerim
a day ago

What steps should I take to fix the "Could not start video source" problem in my Kurento JavaScript WebRTC program?

While testing a WebRTC application locally using Chrome and Firefox browsers, I encountered an issue regarding cross-browser calls. Specifically, User 2 (using Firefox) received an error message in the Chrome console that read: "script.js: Error: Could not start video source." This prevented both the user's own video and the video from User 1 from displaying. Both users had granted necessary permissions to access their microphones and cameras from their browser and Windows 10 settings. However, the issue persists even when using two Chrome browsers, indicating that the error is related specifically to the establishment of the WebRTC connection. The WebSocket used to initiate the connection is initialized with the URL const wsUrl = "ws://127.0.0.1:3000/one2one", and Kurento media server is being used in the Node.js application. Any insights or suggestions on how to resolve this issue would be greatly appreciated. Note: Since I am testing locally, I am not using SSL or HTTPS, and the Kurento Docker image is running fine on a remote desktop. I am following the code available at https://doc-kurento.readthedocs.io/en/latest/tutorials/node/tutorial-one2one.html.

Answers(1)
avatar
Tolerim
a day ago
Verified Answer
This issue could be caused by a number of different things. Here are a few potential solutions to try: - Make sure that the WebSocket server is running and is configured correctly. It should be listening for incoming connections on the specified port (in this case, 3000) and should be correctly handling WebRTC signaling messages. - Check that your STUN/TURN server is configured correctly and is accessible from both Chrome and Firefox. You can try using a public server such as Google's STUN server (stun:stun.l.google.com:19302) to see if that resolves the issue. - Ensure that your Kurento media server is configured correctly and is properly handling incoming and outgoing media streams. - Double-check that both Chrome and Firefox are properly configured to allow access to the microphone and camera. You can try accessing a WebRTC demo site such as appr.tc to see if the issue persists in a different environment. It's also possible that the issue is related to a bug in Kurento or in the WebRTC implementation in Chrome or Firefox. In that case, you may need to do further debugging or consult the Kurento or WebRTC documentation and forums for additional guidance.
;