webRTC: Session establishment

Tags: til webrtc web

A session consists of a peer connection on either end, with negotiated session parameters and an established bi-directional UDP connection.

The session parameters, or description, are specified as a Session Description Protocol message (SDP).

It's easiest to arrange things so that one peer, the caller, initiates the negotiations to the other perr, the caller:

Once both parties know each other's session parameters they independently come to the same conclusion about how the session should work. Note that this is done entirely via the signaling channel, and does not involve a peer to peer connection.

ICE tries to establish a UDP connection path between peers by identifying UDP address "candidates". These candidates are communicated via the signalling channel, and both sides attempt to connect to all the other peer's candidates.

Published on: 30 Aug 2025