Scene:
1, A call B
2, B answer
3, A connected with B
Common steps:
Both A and B need to initialize the WEBRTC module to create the Peerconnectionfactory
Status of a in step 1
1. Create Peerconnection instances through Peerconnectionfactory
2. Call Peerconnection.createoffer
3, PeerConnection.Observer.onCreateSuccess (final sessiondescription ORIGSDP)
4. Send SDP to B
5, the following is the collection of Icecandidate, send the mobile phone icecandidate information sent to B, and then is the changes in various states,
These states are mainly: 1, icegatheringstate 2, signalingstate 3, Iceconnectionstate
Steps in step 2 of B
1, b after receiving the SDP sent by a, B creates the Peerconnection instance
2. B Set the received SDP to the Peerconnection instance
3. Call Peerconnection.createanswer in PeerConnection.Observer.onSetSuccess ()
4. PeerConnection.Observer.onCreateSuccess (final sessiondescription ORIGSDP) Send SDP message to a
5, through step 1 of 5
Step 3, A and B
1, A and b receive the icecandidate sent by the other side, set to their corresponding peerconnection instances
2. Find the right icecandidate then, establish the connection
In order to simplify the problem, the middle omitted a lot of details, there are questions please leave a message 576487833
WEBRTC interface invocation process for video calls based on WEBRTC