There might be some public or semi-public servers for this kind of thing available somewhere, or the alternative that I played with a few years ago was to compress and base64 encode the connection information into a string, and allow users to share the link with friends via whatever method they want, and that can then be expanded client side and used to establish the connection. (Or something like qr codes I've also seen used)
Sadly I never finished that project, so I don't really have any code to show you, but in theory it should work okay.
Doesn't work anymore.
Firefox times out the answer offer after very few seconds, which makes sharing the answer offer asynchronously impractical, which effectively killed serverless WebRTC and in turn killed any interest I had on it (for my side projects I mostly do serverless web apps, as in real serverless, not lambda functions).
Is there a ticket number or blog post or something I can research to learn a bit more about the reasoning behind this change with them?
> So every 5 seconds Firefox (version >= 49) sends another binding request no matter if the ICE transport is in use or not, and it expects the other side to reply with a binding response. If it hasn’t received a binding response for 6 consecutive binding requests, in other words no reply within the last 30 seconds, it will give up and mark the transport as failed. This results in switching the ICE connection state to ‘failed‘ and stop sending any packets over that transport.
The central servers don't have to do much, but they need to exist so new nodes on random IPs can find each other. The Internet has no native service discovery bus.
There’s nothing to stop you doing this through broadcast messages on a local network, though I’m not aware of any way that could be done from within a browser. You could extract the SDP and ICE messages from the browser environment and handle that in Node though, if you were using Electron or something.
Based on: https://webrtc.github.io/samples/src/content/peerconnection/...
You will need to know where the other peer lives. Which is why they expect you to have a discovery service. But typing in local IP's should work for internal networks. The hardest part is getting through NAT and firewalls and that's not a problem on your own LAN.
Looks up DHT use.
Disclaimer: Google employee, work on the WebRTC team.
After getting frustrated with all the other WebRTC libraries over the last 4 years, I finally wrote our own ( https://github.com/amark/gun/blob/master/lib/webrtc.js ) which is capable of using a set of decentralized DHT relay-peers in GUN for signaling - and once peers are already on WebRTC, they can signal (daisy-chain "DAM" as we call it) to other WebRTC peers via WebRTC!
Meaning, you don't/won't have to run any servers!!! Ping us on our chatroom if you want the list of DHT peers.
Parent:
Chuck! Sounds like you'd be a very useful person to know. Me, Feross, etc., plenty others have been requesting additional API/protocol access over the last 4 years (some of which FireFox is adding in libdweb extension!). Any chance we could connect and chat? Ping me at mark@gun.eco ?
I'll start one with just mine, and then others can PR to opt-in. You want to join?
I'm not actually using WebRTC (or GUN) yet, but I hope to for a project relatively soon and the possibility of not requiring a STUN/ICE server is very enticing to me.
Source: Google employee, in the WebRTC WG.
Also in general, I highly recommend webrtc-adapter.
I used this dockerized coturn server successfully:
However if you connected @mywebRTClobby with https://GroupTweet.com you could configure things so that any @mentions (from authorized users or anyone) would be converted into actual tweets from the @mywebRTClobby account so that all followers would actually see those tweets/contact details.
Edit: STUN is free, Turn is not. Been a while since I worked with those.
You can register for an account on my server. WebRTC downstream seems to be working at the moment. Be sure to read the instructions, however.
https://www.emergencevector.com
I am thinking of turning my game server into a serverless PaaS offering. I'm open to collaborating on this.
A single connection-initiation server could be the easiest solution. It won't need to withstand a heavy load.