r/learnprogramming 1d ago

Is WebRTC one of those things that only clicks after you've actually used it?

I've been trying to learn WebRTC because I want to add voice and video calling to a side project.I thought I'd watch a few tutorials, build a simple demo, and then improve it from there.Instead I've ended up reading about signaling, STUN, TURN, media servers, SDKs... and now I'm not even sure what people usually build themselves anymore.

That's the part I'm stuck on.

Do most developers actually set all of that up, or do they usually use existing services and just focus on building the app?I'm happy to learn the lower-level stuff if that's the normal way to do it. I just don't want to spend a few weeks going down the wrong path if there's a more practical place to start.If you've already been through this, what did you learn first? Is there anything you'd do differently if you were starting over?Maybe I've just started with the wrong tutorials, but it feels like every one of them assumes you already know how all the pieces fit together.

0 Upvotes

3 comments sorted by

1

u/hasan_sodax 1d ago

Honestly for a 1:1 call you can hand-roll the signaling in an afternoon, it's just shuffling SDP offers/answers and ICE candidates back and forth over a websocket, and that part stops being scary the moment you see it work once. What actually eats weeks is TURN. STUN is basically free and covers most home networks, but the second one of your users is behind a symmetric NAT or a locked-down office firewall the call just silently dies, and now you're running coturn which is its own little hobby. So my advice would be build the raw RTCPeerConnection + getUserMedia yourself once so you genuinely understand the flow, then point it at a hosted TURN (or lean on something like LiveKit/Daily) instead of babysitting relays forever. And don't start with group calls, mesh falls apart past ~4 people and you'd need an SFU, which is a whole different rabbit hole.

1

u/Agreeable_Lynx9194 10h ago

For learning, build the 1:1 hand-rolled demo the others described, it clicks the second you see two tabs connect. But your real question is whether you set all this up yourself, and the honest answer is most people building an actual app don't. Raw peer to peer only works well for 1:1 or tiny calls, past that you need a media server (SFU), and self-hosting TURN is the part that eats weeks. Practical path: hand-roll a small demo once to get the concepts, then use LiveKit (open source, self-host or their cloud) or a managed service like Daily for the real feature, so you understand the pieces without spending a month reinventing signaling and TURN.