videocalling

WebRTC

技術

Web Real-Time Communication - the technology enabling browser-based video calls

What is WebRTC?

WebRTC (Web Real-Time Communication) is a free and open-source technology that enables web browsers and mobile applications to support real-time communication through simple APIs. It allows websites and apps to capture and stream audio, video, and arbitrary data directly between browsers without requiring plugins, extensions, or intermediary servers.

Developed by Google and standardized by the W3C and IETF, WebRTC has become the foundation of modern browser-based video calling, making it possible to start a video call simply by visiting a website—no downloads required.

How WebRTC Works

WebRTC establishes peer-to-peer connections between browsers, enabling direct communication without routing data through servers. This architecture provides three key advantages:

  • Lower latency: Direct connections achieve sub-250ms latency, essential for real-time conversations
  • Better privacy: Data flows directly between participants, not through third-party servers
  • Reduced server costs: Peer-to-peer architecture minimizes bandwidth and infrastructure requirements

Core Components

WebRTC consists of three main JavaScript APIs:

1. getUserMedia

This API grants web applications access to the user's camera and microphone. When a website requests media access, the browser prompts the user for permission, ensuring privacy and security. Once granted, getUserMedia captures audio and video streams that can be displayed locally or sent to other peers.

2. RTCPeerConnection

This is the heart of WebRTC, handling the complexity of establishing and maintaining direct connections between browsers. RTCPeerConnection manages:

  • Signal processing and codec handling
  • Security and encryption
  • Bandwidth management and congestion control
  • Network traversal through NAT and firewalls

3. RTCDataChannel

While getUserMedia and RTCPeerConnection handle audio and video, RTCDataChannel enables peer-to-peer transfer of arbitrary data. This can be used for text chat, file sharing, or any other data exchange during a call, using the same low-latency connection as the media streams.

Browser Support

As of 2025, WebRTC is natively supported in all modern browsers:

  • Google Chrome (desktop and mobile)
  • Mozilla Firefox (desktop and mobile)
  • Apple Safari (desktop and iOS)
  • Microsoft Edge
  • Opera

No plugins, extensions, or additional software installations are required, making WebRTC truly universal for browser-based communication.

Common Use Cases

WebRTC powers a wide range of real-time communication applications:

  • Video conferencing: Tools like Google Meet, Zoom (web version), and Microsoft Teams use WebRTC for browser-based calls
  • Screen sharing: Enabling remote collaboration and presentations directly in the browser
  • File transfer: Peer-to-peer file sharing services use WebRTC's data channels for fast, secure transfers
  • Live streaming: Ultra-low latency streaming for interactive broadcasts and gaming
  • IoT and remote control: Enabling real-time control and monitoring of devices

Security Features

WebRTC is designed with security as a priority:

  • Mandatory encryption: All WebRTC communications are encrypted using DTLS (Datagram Transport Layer Security) and SRTP (Secure Real-time Transport Protocol)
  • Permission-based access: Browsers require explicit user consent before accessing camera and microphone
  • Secure origins: WebRTC APIs only work on HTTPS pages, preventing man-in-the-middle attacks

Limitations and Challenges

While WebRTC is powerful, it has some limitations:

  • Scalability: Peer-to-peer architecture works well for 2-8 participants but struggles with larger groups. Beyond this, media servers using SFU or MCU architectures are typically needed
  • NAT traversal complexity: Establishing connections through firewalls and NAT requires additional infrastructure (STUN and TURN servers)
  • Bandwidth requirements: Multiple simultaneous connections can consume significant bandwidth, especially for HD video

Why WebRTC Matters in 2025

WebRTC has democratized real-time communication by making it accessible through any web browser. Before WebRTC, video calling required specialized software like Skype or proprietary plugins. Today, you can start a video call by simply sharing a link—no downloads, no installations, no barriers.

This simplicity has made WebRTC the de facto standard for browser-based video calling, powering everything from enterprise conferencing tools to casual friend-to-friend calls. As of 2025, WebRTC continues to evolve with improved codec support, better congestion control, and enhanced privacy features, maintaining its position as the foundation of real-time web communication.

References