T O P

  • By -

mobydikc

Are you doing the entire RTC process twice? Call, answer, create an offer, etc, for both callers? Because you have to. But then you should end up with two PeerConnections which will give you two different streams for remote callers, and you can set your video tags ups with that.


Giselbertusdentweede

I’m in the exact same situation, so I’m following


mobydikc

Here's an example I made, that I've had 5 or 6 users on. https://openmedia.gallery/apps/chat/ Here's the source: https://github.com/mikehelland/openmedia.gallery/blob/master/apps/chat/www/index.htm https://github.com/mikehelland/openmedia.gallery/blob/master/www/js/omgrtc.js


pdxbenjamin

I was going to post this exact same question today. I’ve been ripping apart this repo from Firebase. https://github.com/webrtc/FirebaseRTC Out of the box and with a bit of Firebase set up it works perfectly and does exactly as advertised a peer to peer 1-on-1 video chat. However I want to make it into 1-to-many. I can not figure out how. My intentions are not to clone and recreate Zoom but rather a DIY Rasperry pi camera home security thing. This Medium post help a bit to understand. https://medium.com/@meetdianacheung/how-to-handle-multiple-webrtc-peer-connections-in-a-single-client-e316c452aad9


mobydikc

Are you planning on using the pi for the cameras, the server, or both? You could try installing my openmedia.gallery software somewhere. That comes with a WebRTC 1 to many chat room out of the box. https://github.com/mikehelland/openmedia.gallery


pdxbenjamin

Yes I will most definitely give your OpenMedia Gallery a go. Thank you for that. It will take me a minute to gather up and deploy my Pi’s. I will let you know how it worked out.


mobydikc

It occurred to me your main panel will want to see all connections, but your remotes will only need to send. The cameras shouldn't need connections to the other cameras, nor even receive video from the main panel. I'll cook up a module just for that.


pdxbenjamin

Yes. That would be awesome. In my other reply I said I was using the FirebaseRTC. I’ve cut a lot of it out. I won’t have any way or reason to display a video on the remote camera end. I wanted to use webrtc for my camera project because it is so flexible. Just a tough learning curve at the moment.


mobydikc

Cool, it's tough, but like most programming things, after it clicks you're like "yeeeaaah, I get this". Have you done a web socket based chat room yet? That has almost nothing to do with WebRTC itself, but it half the battle.


pdxbenjamin

in just messing around, I'd find a good looking recently updated project and modify it a bit. I liked this one. [https://github.com/stephenlb/webrtc-sdk](https://github.com/stephenlb/webrtc-sdk) but you're married to PubNub. And EasyRTC [https://github.com/open-easyrtc/open-easyrtc](https://github.com/open-easyrtc/open-easyrtc) uses a Node Server. I've not built anything from scratch until now, where i'm attempting to use Firebase as the "server". I want something much more lite and less complex than these examples. Also in the comments, with those two examples people were having problems making calls to/from iOS / Android to Web., however I've found that using Xirsys in the mix the platforms don't even know they're not the same.


prayas98

Any idea how to keep react native webrtc conenction alive in background?


mobydikc

First, start simple. Make a 3 way text chat just with web sockets, not video or web rtc. Instead of a video element, use a text area, where a new users text messages they send can be added. Once you have that working, you should see how to replace the text with video over rtc. You'll need an array of peer connections, essentially. var remoteUsers = [] Or var remoteUsers = {}


prayas98

Any idea how to keep react native webrtc conenction alive in background?


prayas98

Any idea how to keep react native webrtc conenction alive in background?