乐闻世界logo
搜索文章和话题

What is WebRTC? What are its main components?

3月7日 19:43

WebRTC (Web Real-Time Communication) is an open real-time communication technology that allows web browsers and mobile applications to conduct peer-to-peer audio/video calls and data sharing without the need for plugins.

The main components of WebRTC include:

  1. Media Capture Layer: Accesses the user's camera and microphone through the getUserMedia() API.

  2. Media Processing Layer: Includes codecs, echo cancellation, noise suppression, and other audio/video processing functions.

  3. Transport Layer: Based on UDP's SRTP (Secure Real-time Transport Protocol) and SCTP (Stream Control Transmission Protocol), ensuring secure data transmission.

  4. Signaling Layer: Responsible for establishing and maintaining communication sessions, including session initialization, media negotiation, network address negotiation, etc. Developers need to implement this themselves, typically using WebSocket or HTTP.

  5. P2P Network Layer: Includes ICE (Interactive Connectivity Establishment), STUN (Session Traversal Utilities for NAT), and TURN (Traversal Using Relays around NAT), used to establish peer-to-peer connections in NAT and firewall environments.

  6. API Layer: JavaScript APIs provided for developers to use, including RTCPeerConnection, RTCSessionDescription, RTCIceCandidate, etc.

标签:WebRTC