4 ms·
Took some time over the weeks to play and figure out WebRTC. Made a simple app out of it. Do check it out!
by xueyongg 6y ago
Took some time over the weeks to play and figure out WebRTC. Made a simple app out of it. Do check it out!
- EGreg 6y agoWe started a simple webrtc app in 2018. Thought it would be simple. Now two years later we are still tweaking the code and dealing with handshakes and codecs across browsers, as well as edge cases involving firewalls and what to do if someone disconnects for longer than the timeout. Finally we had to invent workarounds for Cordova: https://mobile.twitter.com/qbixapps/status/1156484156425039872 https://mobile.twitter.com/qbixapps/status/11564841564250398... Did anyone set up a WebRTC that was super easy and worked rock solid with just a few lines?
- tim-- 6y agoTwillio has this, but it is crazy difficult to do DIY something in the real world.
- EGreg 6y agoYes. Twilio and maybe Jitsi. We open sourced our implementation. I am still wondering if we missed some simple solution.
- gligorot 6y agoFirst off, I'm a total noob when it comes to WebRTC, but having read the docs Google provide for it (and the accompanying mini video app tutorial) it seemed like it's dead simple to implement and use - I understood that the complexities and basically everything you talked about above was already handled. Is your implementation different than theirs or did I maybe misunderstand the value propositions of WebRTC?
- EGreg 6y agoSee the sister comment to yours
- sandGorgon 6y agocurious to know - how do you scale webrtc ? I mean do you use kubernetes and stuff - what load balancer do you use (I assume sessions are "sticky"), etc
- ethanwillis 6y agoScaling doesn't always involve kubernetes. But the way you scale WebRTC is by using multiplexers between clients. Let's say you have 2 clients. They can directly send data to each other. Let's say you have 3 clients. Client 1 sends data to Clients 2, 3 Client 2 sends data to Clients 1, 3 Client 3 sends data to Clients 1, 2 As you add more clients the scaling requires n(n-1)/2 edges because it forms a Complete Graph. The idea then is to use a server in the middle. That server could be 3rd party or maybe even one of the participants within the graph.
- sandGorgon 6y agosure - but ultimately you will have to scale the server horizontally. or do you mean that one server can scale till millions of users
- ethanwillis 6y agoIf you have millions of users sure use kubernetes. If you don't have millions of users just setup a handful of decently sized VMs.
- Mulpze15 6y agoAren't those codec exchanges and handshakes managed by ICE? Why would you need to go into this layer yourself?
- fictorial 6y agoOne example – H.264 is hardware accelerated on iPhone so one might prefer this over VP8 which could drain the device's battery pretty quickly when used in a P2P mesh setup.