How to Use anychat to implement audio/video interaction between any dual-user

Source: Internet
Author: User

Currently, the anychat SDK only supports audio/video and text interaction between users in the room. If two users want to interact audio and video after logging on to the system, they need to process the process, the general process is as follows:

 

 

1. A logs on to the system. Server SDK records information of A. 2. B logs on to the system. Server SDK records information of B (and determines whether a and B are friends) server SDK sends the information (user ID and user name) of a to bserver SDK. It sends the information of B to A3, a request to chat with B. A sends a custom command to server SDK, I want to chat with B. The server SDK assigns a room ID (for example, it can be accumulated from 1 Development) the server SDK notifies a, B4, A, and B of the allocated room ID. After receiving the room number allocated by the server, 5, A, and B enter the room, open local audio and video devices to each other. Please request the other party's audio and video. The process above is relatively simple. Two places are omitted: 1. A requests B to chat, the server finds that B is chatting with others. A needs to be notified, and the request fails. 2. A requests B to chat, whether B needs confirmation. After confirmation, the server assigns an ID, and notify a and B (the confirmation process can be directly sent to B through a, and a custom command through transparent channels );

1. A logs on to the system and the server SDK records the information of.

 

2. B logs on to the system, and the server SDK records B's information (and determines whether a and B are friends)

Server SDK sends information (user ID and user name) of A to B

Server SDK sends B's information to

 

3. A requests to chat with B

A sends a custom command to the server SDK and wants to chat with B.

Server SDK assigns a room ID (for example, it can be accumulated from 1 Development)

Server SDK notifies a and B of the allocated room ID

 

4. A and B enter the room after receiving the room number assigned by the server

 

5. After entering the room, a and B open their local audio and video devices. Please request the audio and video of the other party.

 

The above process is relatively simple, with two points omitted:

1. A requests B to chat. The server finds B is chatting with others. A must be notified and the request fails;

2. A requests B to chat. Do you need B's confirmation? After confirmation, the server allocates the ID and notifies a and B (the confirmation process can be sent directly to B through, use transparent channels to customize a command );

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.