5 exercises on WebRTC concepts — ICE, STUN/TURN servers, SDP, and signaling.
0 / 5 completed
1 / 5
What is the role of a STUN server in WebRTC?
STUN (Session Traversal Utilities for NAT): a client sends a request to the STUN server, which replies with the public IP/port the packet arrived from. The client includes this candidate in its ICE list so peers behind NAT can reach each other.
2 / 5
When is a TURN server required instead of STUN?
TURN (Traversal Using Relays around NAT): if direct ICE candidates fail (e.g. symmetric NAT on both sides), TURN relays all media through itself. It is a fallback — expensive in bandwidth — used only when direct connectivity is impossible.
3 / 5
What does SDP (Session Description Protocol) describe in a WebRTC connection?
SDP: an offer or answer SDP document lists supported codecs (VP8, H.264, Opus), media directions (sendrecv), ICE candidates, and DTLS fingerprints. Exchanging SDP via signaling is the first step to establishing a peer connection.
4 / 5
What is ICE (Interactive Connectivity Establishment)?
ICE: each peer gathers candidates (host, STUN-reflexive, TURN-relay), exchanges them via signaling, then performs connectivity checks in priority order using STUN binding requests. The best working pair is chosen for media.
5 / 5
What is the purpose of the signaling channel in WebRTC?
Signaling: WebRTC deliberately leaves signaling unspecified. Developers typically use WebSocket, HTTP, or a service like Firebase to exchange SDP and ICE candidates. Only once peers agree on media parameters does the direct peer connection open.