Communication Architecture of WebRTC

Summary

This article briefly describes WebRTC’s end-to-end and many-to-many communication architecture and related terminology.

WebRTC end-to-end communication architecture

The core goal of WebRTC is end-to-end (Peer to Peer) real-time audio and video communication. If WebRTC does not have communication functions, it becomes a local audio and video collection and player.

WebRTC end-to-end communication architecture diagram

The main node functions in the above figure are as follows:

  1. Signaling server: handles session commands, such as the creation and teardown of sessions (commonly known as rooms).
  2. STUN/TURN server: Responsible for assisting NAT penetration (commonly known as P2P hole punching) when attempting point-to-point communication; responsible for relaying and forwarding audio and video data when point-to-point communication is unavailable.
  3. Peer A and Peer B: two browser instances participating in communication. Both instances can run on the same PC behind the same firewall.

 WebRTC end-to-end communication experiment

In order to gain a little more perceptual understanding of the characteristics of WebRTC, we need to build the simplest WebRTC experimental environment.

The experimental environment only needs to support one-to-one real-time audio and video calls between two browser-side processes.

Since the browser has integrated the WebRTC native module, in WebRTC web development, we do not need to care about the WebRTC project source code, we only need to understand its Web API usage. Only when it comes to WebRTC native (Native) development, it is necessary for us to build the WebRTC project source code ourselves&#x

Guess you like

Origin blog.csdn.net/bigwave2000/article/details/132256406