WebRTC in 5 Minutes

May 2015 ยท 1 minute read

While WebRTC has been around for awhile now but its still feels like a young technology and there are few resources to learn about it. These are the basics of how a connection is made between peers which is important for understanding how WebRTC differs from traditional networking.

Creating a Connection


__Fetch ICE (Interactive Connectivity Establishment) Candidates from STUN server.__

If STUN reports we are unreachable (behind a symetric NAT?) then we must use a TURN relay.

Make an offer SDP which contains meta-data about the data the peers will be sending.

SDL is shared with peer via Signal Channel.

Remote party answers with their own SDP via Signal Channel.
Peers connect with information recieved SDP.



_I learned about WebRTC in the context of [WebTorrent](https\://github.com/feross/webtorrent) which is an amazing project, you should check it out._