WebRTC - Web Real-Time Communication

What is WebRTC?

WebRTC (Web Real-Time Communication) is an open-source project and protocol that enables real-time audio, video, and data sharing directly between browsers and devices without the need for plugins or additional software.

Why is WebRTC useful?

  • Enables peer-to-peer communication for video calls, voice calls, and data sharing.

  • Eliminates the need for intermediary servers for media traffic, reducing latency.

  • Built into modern browsers, so no installation is required.

  • Supports secure, encrypted communication.

How it works?

  • WebRTC uses signaling (via external servers) to exchange session information.

  • It performs NAT traversal with ICE, STUN, and TURN protocols.

  • Peers establish a direct connection to share media streams or data channels.

  • Media streams are encoded, transmitted, and decoded in real-time using codecs.

  • Encryption is applied to ensure privacy.

Where is WebRTC used?

  • Video conferencing apps (e.g., Google Meet, Zoom Web client).

  • Real-time chat and collaboration tools.

  • Live streaming and broadcasting platforms.

  • File sharing applications.

  • IoT device communications.

Which OSI layer does this protocol belong to?

  • WebRTC operates mainly at the Application Layer (Layer 7).

  • It relies on lower layers (Transport and Network) for data transmission.

  • It also involves protocols like ICE/STUN/TURN for connection management.

Is WebRTC Windows specific?

No. * WebRTC is platform-independent. * Supported on Windows, macOS, Linux, Android, iOS, and browsers on all these platforms.

Is WebRTC Linux specific?

No. * WebRTC is not Linux specific. * It runs on any platform with compatible browsers or WebRTC implementations.

Which Transport Protocol is used by WebRTC?

  • WebRTC uses UDP primarily for real-time low-latency media transport.

  • TCP is used as a fallback if UDP is blocked.

  • Data channels can use SCTP over DTLS for reliable data transport.

Which Port is used by WebRTC?

  • WebRTC uses dynamic ports negotiated during session setup.

  • It typically uses UDP ports 1024-65535 for media.

  • STUN and TURN servers commonly use ports 3478 (UDP/TCP).

Is WebRTC using Client server model?

  • WebRTC primarily uses a peer-to-peer model for media and data exchange.

  • However, signaling (session setup) requires servers.

  • TURN servers may be used to relay traffic when direct peer-to-peer connectivity fails.

  • In this section, you are going to learn

  • Terminology

  • Version Info

  • rfc details

  • setup

  • setup

  • packet details

  • usecases

  • features

  • Reference links