Direct Media In The Browser
WebRTC lets two browsers exchange audio, video, and arbitrary data directly, without routing every packet through a server. This keeps latency low for calls, conferencing, and peer to peer data.
Signaling Comes First
Before peers can connect, they must exchange setup information through a signaling channel that the application provides, often a WebSocket.
- One peer creates an offer describing its media and capabilities.
- The other returns an answer.
- Both exchange network candidates discovered through ICE.
WebRTC does not define signaling itself, leaving that to the application.
Building The Connection
Once peers know each other candidates, the ICE framework with STUN and TURN finds a working network path, usually direct and relayed only when necessary. WebRTC then establishes encrypted transport, since encryption is mandatory for all WebRTC media and data.
What Flows Across It
- Media tracks carry audio and video, adapting quality to available bandwidth.
- A data channel carries arbitrary messages with configurable reliability and ordering, useful for games and file transfer.
Because the path is direct and encrypted, WebRTC delivers private real time communication that scales without a media server in the middle for small sessions.
Key idea
WebRTC exchanges an offer answer and candidates over a signaling channel, then uses ICE to build a direct encrypted path carrying media tracks and data channels between browsers.