The link address of the original English text is: Https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Overview
WEBRTC is a technology that collaborates with a number of associated APIs and protocols to support the exchange of data and media information between two or more terminals. This article provides an introduction to these APIs and provides functionality.
Rtcpeerconnection
You need to connect the two terminals before the media can be exchanged or the data channel is set up. The completion of this connection process is the use of RTCPeerConnection
interfaces.
MediaStream
MediaStream
The interface describes the media stream that is transmitted between the terminals. This stream consists of one or more media channel information, which is usually an audio channel or video channel information.
A media stream can transmit real-time media (such as audio calls or video conferencing) or existing media (such as online movies).
Rtcdatachannel
The WEBRTC supports the transfer of binary data between the two terminals in which the connection is established. This process passes through the RTCDataChannel
interface.
This interface can be used as a reverse channel of data, even as the main data channel to exchange various data.
For example, in the game application, through this interface can realize multi-player support, transfer the player's action updates and other data.
WEBRTC's Study (ii)