This topic describes the components and workflow of the Interactive Classroom project. It also explains how the project uses the ApsaraVideo Live service through the ApsaraVideo for Media software development kit (SDK).
Project components
This project has three main components.
Client: Provides a set of interfaces for teachers and students. This component interacts directly with users.
AppServer: The AppServer uses services, such as Function Compute (FC), to provide a backend service for AUI Kits. This service supports fast deployment and flexible customization. In this project, the AppServer acts as the server-side component and interacts with the ApsaraVideo Live service through the ApsaraVideo Live API.
ApsaraVideo Live service: ApsaraVideo Live is an audio and video streaming platform built on a content delivery network and large-scale, distributed, real-time transcoding technology. ApsaraVideo Live provides easy-to-use, high-definition, low-latency, and high-concurrency audio and video streaming services. In this project, it provides features for live streaming, co-streaming, and group messaging.
Project workflow
The Interactive Classroom project workflow has three main parts.
A teacher creates a classroom and starts a live stream. When the classroom is created, a live stream message group is also created.
Students enter the live channel. They can watch the video stream and send messages in the live stream.
A student initiates a co-stream or is invited by the teacher to co-stream. The student then starts their audio and video stream. Other students in the class watch a mixed stream that includes the teacher and the co-streaming student.
The following sequence diagrams describe these three parts in detail.
A teacher creates a classroom and starts a live stream
This part has two steps.
Create a classroom.
Start the class, which starts the classroom live stream.
The following sections describe these two steps.
Create a classroom
This section describes the flow for a teacher to create a classroom. The teacher sends a request from the client to the AppServer to create a classroom. The AppServer uses the ApsaraVideo Live API to create a live message group and retrieve the classroom streaming URL. The AppServer creates a classroom record in the database, which includes information about the live message group and the live channel. Then, it returns the classroom information to the client. The teacher can then send messages in the live message group from the client.
For this part, the AppServer must use the ApsaraVideo Live API to create a live message group and return the classroom streaming URL. In the ApsaraVideo Live console, you must configure an ingest domain, configure a streaming domain, create a live interactive messaging application, and create an ApsaraVideo Real-time Communication application. Then, you can configure the whiteboard.
Start the classroom live stream
This section describes the flow for a teacher to start a live class. The teacher uses the client to capture audio and video. Then, the teacher uses the ApsaraVideo for Media SDK to ingest the stream to the ingest URL. The client sends a request to the AppServer to change the classroom status in the DB to "class started". The AppServer then notifies the student clients to pull the stream for viewing.
For this part, the client requires an ingest URL for stream ingest. In the ApsaraVideo Live console, you must configure an ingest domain, configure a streaming domain, and create an ApsaraVideo Real-time Communication application.
For this part, the client uses the Web Co-streaming SDK from ApsaraVideo for Media to ingest the stream to the ingest URL. The student clients use the Player SDK from ApsaraVideo for Media to watch the classroom live stream.
A student watches the live stream
This section describes the flow for a student to join a classroom, send group messages, and watch the live class. The student sends a request from the client to the AppServer to join a specific classroom. The AppServer returns the classroom information to the client based on the class ID. The student can then send messages in the live message group and watch the live stream if the class has started.
For this part, the client uses the Player SDK from ApsaraVideo for Media to watch the classroom live stream.
A student joins a co-stream
This section describes the flow for a student who is invited by the teacher to join a co-stream. This is a complex flow that involves the following four roles:
Teacher: Invites a student to join the video co-stream.
Invited student: Is invited by the teacher to join the video co-stream.
Other co-streaming students: Students who are already in the video co-stream with the teacher.
Audience students: Students who are not in the video co-stream.
For this part, the client uses the Player SDK from ApsaraVideo for Media to watch the classroom live stream. You must enable Bypass Live Streaming when you create an ApsaraVideo Real-time Communication application.