WebDevSimplified / Zoom-Clone-With-WebRTC

1.52k stars 865 forks source link

Multible Clients #35

Open linusromland opened 3 years ago

linusromland commented 3 years ago

Have the program started And peerJS started on port 3001. I go to http://localhost:3000. I see my webcam. Then open a second tab and go the the same site with the same id. Nothing happens. The Webcam is shown on both tabs. But just my own. Not the other tabs webcam. The streams are not sending. What could be wrong?

liebsen commented 3 years ago

Try enabling ssl first then test with multiple devices as your webcam will be available in one instance only. 

Sent from my Samsung Galaxy smartphone. -------- Original message --------From: Linus Romland notifications@github.com Date: 06/12/2020 13:40 (GMT-03:00) To: WebDevSimplified/Zoom-Clone-With-WebRTC Zoom-Clone-With-WebRTC@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [WebDevSimplified/Zoom-Clone-With-WebRTC] Multible Clients (#35)

Have the program started And peerJS started on port 3001.

I go to http://localhost:3000. I see my webcam. Then open a second tab and go the the same site with the same id. Nothing happens. The Webcam is shown on both tabs. But just my own. Not the other tabs webcam. The streams are not sending. What could be wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/WebDevSimplified/Zoom-Clone-With-WebRTC/issues/35", "url": "https://github.com/WebDevSimplified/Zoom-Clone-With-WebRTC/issues/35", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

linusromland commented 3 years ago

I have tried with Firefox with one webcam and input device and chrome with antoher wrbcam and input device. Still Doesnt work. And SSL is on

mariusndini commented 3 years ago

I have the same challenge. Tried using 3 different browsers for 3 different streams and it does not show more than one. Very cool demo though.

kdhaka94 commented 3 years ago

I have tried with Firefox with one webcam and input device and chrome with antoher wrbcam and input device. Still Doesnt work. And SSL is on

Check the dev console

linusromland commented 3 years ago

I have tried with Firefox with one webcam and input device and chrome with antoher wrbcam and input device. Still Doesnt work. And SSL is on

Check the dev console

nothing is printed in the console.

TheOtterlord commented 3 years ago

I get this in dev console

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3001/peerjs/id?ts=16116817853420.40311359429702054. (Reason: CORS request did not succeed).
kdhaka94 commented 3 years ago

I have tried with Firefox with one webcam and input device and chrome with antoher wrbcam and input device. Still Doesnt work. And SSL is on

Check the dev console

nothing is printed in the console.

Disable helmet or any cross-origin changer you are using

kdhaka94 commented 3 years ago

I get this in dev console

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3001/peerjs/id?ts=16116817853420.40311359429702054. (Reason: CORS request did not succeed).

Disable helmet if you have it as a middleware

TheOtterlord commented 3 years ago

No, don't have helmet. Not even sure what it is

asvinp commented 3 years ago

I had the same issue where 2nd video wasn't showing and was able to solve by adding a 1 second timeout before running connectToNewUser(). Thanks to the YouTube comment by 11Scorpion.

socket.on('user-connected', userId => {
    console.log("Connected: ", userId)
    setTimeout(() => {
      connectToNewUser(userId, stream)  
    }, 1000);
})

YT Comment image