Menu

1 / 2

Signalling as a driver: how we built a transport-agnostic WebRTC library

DEV Community·Peerix·6 months ago
#yjH6pJQ5
#webdev#typescript#javascript#opensource#peer
Reading 0:00
15s threshold

If you've ever tried to build a peer-to-peer app in the browser, you've probably noticed something: every WebRTC library makes the signalling decision for you.

PeerJS bundles its own broker. simple-peer leaves signalling entirely up to you. Most libraries in between hardcode one transport and build the API around it. Change your mind about signalling later, and you're rewriting a lot of code.

Peerix takes a different approach. The signalling layer is a driver — pluggable, swappable, and completely separate from the peer logic.

Two concerns, one library

WebRTC has two distinct problems mixed into one specification.

The first is signalling: how peers find each other and exchange the SDP offers, answers, and ICE candidates needed to set up a connection. This is a transport problem.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.