As COVID-19 has become the norm, online study rooms, a new “sharing” model that provides a quiet and clean study environment, are gaining popularity. In order to meet the market demand, anyRTC also officially launched online study room Demo! And open source code, hoping to help developers achieve real-time interactive scenes more quickly, and create more unique gameplay!

What is the function of online study room?

The ultimate goal of setting up an online self-study room is to improve the efficiency of learning by increasing the enthusiasm of students. AnyRTC interactive live broadcast products, only need to call 1 API, 4 lines of code, 30 minutes to achieve real-time audio and video and interactive live broadcast products. In the scenario of online study room, you can seamlessly switch from the state of watching live broadcast to the state of online study room. Full platform support, even if the user uses the light application of wechat small program, can also be quickly realized. Specifically, the functions of the online study room are as follows:

(1) Through the live broadcast function, students in Shanghai can obtain the supervision of others indirectly through the live broadcast of their learning status, promote their learning enthusiasm and improve their academic performance.

(2) Different scenes of study room has different play, the teacher as an audience into the online study room to watch the state of the study room, through text messages or picture messages to urge the mack personnel into the state of learning, and can answer questions for self-study students, avoid students go astray.

(3) Let the audience see each student’s learning state, stimulate their own self-discipline, and quickly enter the learning atmosphere.

AnyRTC provides two solutions for self-study live broadcast scenarios:

Solution a:

1. The program is all real-time streaming, and the page layout is flexible. Even for the viewer, the video layout on the current mic can be dynamically switched.

2. The number of students on the mic is generally about 4. AnyRTC can support a maximum of 50 people on the mic at the same time, and the number of viewers is unlimited.

3. The delay of all personnel in the channel is about 200ms.

4. Content audit can be carried out with the help of cloud recording service to ensure the legal compliance of the platform.

Scheme 2:

1. The audience can pull the RTC real-time audio and video stream as well as the CDN audio and video stream.

2. The delay of real-time audio and video stream is about 200ms, and the delay of CDN audience stream generally varies from 1 to 60s according to the protocol type.

3. The number of students on the mic is generally about 4. AnyRTC can support a maximum of 50 people on the mic at the same time, and the number of viewers is unlimited.

4. The layout of CDN pull-end is fixed and cannot be dynamically modified.

5. With the help of cloud recording service, content audit can be carried out to ensure the legal compliance of the platform.

The two schemes have their own strengths and should be selected according to their own scenarios. Scheme 1: Pays more attention to flexible application layout and controllable delay. Plan 2: Pay more attention to cost. In the case of more audiences, it is more conducive to reducing the burden of enterprise operating costs. The demo of our online study room is implemented with plan one.

Demo core functions:

1. The host joins the room. The host chooses to join the room in which no one is present.

Visitors can join the private study room and watch the anchors’ self-study live broadcast on a vertical screen.

3. Apply to join the self-study room. When the space of the self-study room is not full, you can apply to become an anchor on the self-study room and display it in horizontal screen.

4. Change the mic after the host leaves the room, he will automatically hand over the host to mic No. 2. The mic sequence behind him will all move forward one by one.

5. Turn on/off the microphone The host can turn on or off the gag status. Other anchors can turn off their own microphones.

Anchors or tourists entering the study room can click other staff to switch with the host on the large screen. Tourists can also click the large picture again to change to the equal-split screen.

7. Send text messages and pictures Anchors or tourists entering the room of the study room can send text messages or picture messages, and people in the room can communicate with each other through text or picture messages.

8. Exit the room. Click Close to exit the room. Then you can go to the next room to watch or become an anchor on the mic.

How to make your own online study room?

All real-time audio and video interaction and text messages, control commands (such as mic), live streaming and live streaming are realized based on anyRTC RTC SDK and anyRTC REAL-TIME messaging RTM SDK. The demo decomposition can be divided into 4 steps:

1. Import SDK (RTC and RTM) into the project

2. Initialize the SDK

3. Create or enter a room as a guest or host

4. Invoke the interface for switching roles to connect to or unload the server

Based on the above 4 steps, we can implement the basic live viewing function (enter the room, no matter who the identity will automatically subscribe to the audio and video stream in the room). It provides a variety of advanced functional interfaces to help developers better realize personalized business design and achieve scenarios that suit their own business.

Online study room demo download experience: www.pgyer.com/Qpl6