WebRTC
1 min read
Pronunciation
[web-are-tee-see]
Analogy
WebRTC is like a direct phone line between two browsers—once connected, they talk directly without going through a central switchboard.
Definition
A set of real‑time communication protocols and APIs enabling peer‑to‑peer audio, video, and data exchange directly between browsers and applications.
Key Points Intro
WebRTC facilitates real‑time interactions via:
Key Points
Peer connections: Establishes P2P channels with ICE, STUN, and TURN.
Media streams: Transmits audio/video with RTP and SRTP.
Data channels: Unordered or reliable data transfer over SCTP.
NAT traversal: Uses ICE framework to traverse firewalls.
Example
A blockchain-based identity app uses WebRTC data channels to sync user credentials directly between devices without a central server.
Technical Deep Dive
WebRTC’s connection process uses ICE to gather candidates, STUN to discover public endpoints, and TURN for relay if direct connection fails. Once DTLS‑SRTP sessions are negotiated, RTP streams carry media, and SCTP over DTLS carries data channel messages. Signaling (SDP exchange) occurs out‑of‑band via WebSocket or HTTP.
Security Warning
Misconfigured TURN servers can expose IP addresses; always secure signaling channels with TLS.
Caveat
Browser compatibility and network restrictions can complicate peer connection establishment.
WebRTC - Related Articles
No related articles for this term.