WEBRTC is one of the important features supported by HTML5. With it, it is no longer necessary to use the audio-video-related client. The audio and video chat function can be realized directly through the Web page of the browser. And the WEBRTC project is open source. We are able to build our own audio and video chat capabilities at high speed with WEBRTC source code. Whether using the WEBRTC API interface of the front-end JS or building your own chat frame on the WEBRTC source code. are required to follow the following operating procedures:
In the above sequence, WEBRTC does not provide stunserver and signalserver. The server side needs to be implemented by itself. Stunserver can use Google to implement the stun Protocol test Server (stun:stun.l.google.com:19302), Signalserver is completely necessary to achieve their own, It needs to transmit each other's SDP information and candidate information between Clienta and CLIENTB, and Clienta and CLIENTB Use this information to establish a peer-to connection to deliver audio and video data.
Because of the complexity of the network environment, not all of the client can establish peer-to-peer connection, so that the situation requires a relayserver to do audio and video data transfer, this article is based on the source code analysis of the attitude, this situation is not considered.
Here to illustrate, Stun/turn, Relayserver's real today WEBRTC source code has a demo sample, is really a big treasure of the name of the deputy de facto.
The above sequence. The annotated scene is that Clienta initiates a chat request to CLIENTB, invoking descriptive narratives such as the following:
The process here but from the use of the description of the narrative, the details of what the interior has done, how to do, the future of the article will slowly fine, all the beginning difficult, self-encouragement.
From: http://www.cnblogs.com/fangkm/p/4364553.html
Webrtcclient and turn and signaling server communication flowchart