3 ms·
> Unreliable datagrams? WebRTC It's was an interminable wait for WebRTC data channels. Is there a trivial way to get a WebRTC connection to a server now, with
by strbean 4y ago
> Unreliable datagrams? WebRTC
It's was an interminable wait for WebRTC data channels.
Is there a trivial way to get a WebRTC connection to a server now, without pretending that server is a peer and doing the whole handshake dance?
- Sean-Der 4y agoDo you still see challenges with doing WebRTC on a server? I work on https://github.com/pion/webrtc https://github.com/pion/webrtc so would love to hear what could be better :)
- ptrwis 4y agoAnd are you going to run a dedicated signaling service and do all that STUN karate to just connect the peer to a publicly available server?
- eis 4y agoYou don't need STUN to connect to a publicly available WebRTC server.
- Sean-Der 4y ago> dedicated signalling For my small projects I run my HTTP + WebRTC in the same server. My signaling is one POST. Maybe I am missing the complexity, but I don't feel any additional pain compared to running any network service? > STUN Karate Mind explaining more? You don't use STUN for connecting to a world routable host. If you need it I use https://github.com/pion/turn https://github.com/pion/turn and run my STUN server embedded in my HTTP server. I do do anything but point my `PeerConnection` at `my-service.com`
- ptrwis 4y agoWhat I mean is that compared to, for example, WebSockets and WebTransport, WebRTC is more difficult to use (not through third-party libraries but "native" WebRTC data-channel API). But you are right and I was wrong, STUN is not necessary.
- moron4hire 4y agoGod, I wish I could find something like this for .NET.
- paulgb 4y agoWe’ve done some cool things with Pion, like running GIMP server-side and streaming it to a browser[1]. So thanks! I’m not the one who worked directly with Pion so I don’t have direct feedback on it, but one thing I think would do a lot of good for WebRTC data channels becoming widespread is client and server nodejs bindings that abstract away all the complexity so that it is as easy as using websockets. If developers could implement this stuff without having to learn acronyms like TURN and STUN, I think it could be pretty popular. [1] https://twitter.com/drifting_corp/status/1552773567649091584 https://twitter.com/drifting_corp/status/1552773567649091584
- smasher164 4y agoYeah I just wanted to do a client-server app on a UDP-like socket, but WebRTC had so much complexity that it put me off. It's gotten better now, but WebTransport is the solution we've needed for a while.
- graderjs 4y agoI don't know of one. In my remote browser app where I stream the remote browser viewport over webRTC I just use simple-peer on the server and exchange connection info over websocket. It works well. But then I test every xth frame to see if the peer or the socket is faster and switch to that. Websocket is often faster, but not always, so in practice I end up splitting the stream over both websocket and webrtc in real time.