WEBRTC Learning Note 1 (establishing a connection basic process)

Source: Internet
Author: User

Recently in the making of a video software based on WEBRTC, here is a basic understanding of the process of establishing a call connection on the upper level, as recorded here.

Suppose A and B want to establish a video call, A is the room creation end, B is added to the room side:

1, a through HTTP login, get other server address (do some save user information operation, get signaling, stun, turn server address, etc., not necessary)

2, A and signaling server establish websocket long connection

3, a through the websocket to the signaling server registration (create room, record room number, waiting for B to join the room)

4. A Create local video to get SDP information for a

5, b Create a local video, get the SDP information of B

6, B send local SDP information to signaling server Sendoffer

6.1, B also in the stun (traversal), turn (delay forwarding) server to obtain ice information

6.2, B Send ice information to the signaling server (follow-up and a Exchange 3 kinds of information, no longer repeat)

7. Signaling server forwards SDP, ice information to a (through room number identification)

8. A set the SDP information of B to the underlying setremotedescription

8.1, a add ice information for B

8.2, a also in the stun (traversal), turn (delay forwarding) server to obtain ice information

8.3, a send ice information to the signaling server (follow-up and B Exchange 3 kinds of information, no longer repeat)

9. A Send local SDP information to the signaling server Sendanswer

10. Signaling server forwards SDP information to B

11, B set the SDP information for a to the underlying setremotedescription

While exchanging the SDP information, the ice information is also exchanged, and by exchanging ice information, it will eventually choose a suitable way to establish the connection (peer-to/turn server-based delay forwarding path)

WEBRTC Learning Note 1 (establishing a connection basic process)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.