Agora Flexible Classroom makes it easy to embed interactive classrooms into Web apps. It enables you to develop rapidly and easily to enhance your education apps with features including real-time audio and video interaction, real-time messaging, interactive whiteboard, and other teaching tools.
This page shows you the minimum code you need to join a flexible classroom by using the Agora Classroom SDK.
The following figure shows the workflow to join a flexible classroom.
When an app client requests to join a flexible classroom, the app client and your app server interact with the Agora server in the following steps:
Before proceeding, you must have the following:
This section shows how to integrate the Agora Classroom SDK into your application and call the methods provided by the SDK to launch a flexible classroom.
Follow the steps to create a minimal Web project:
agora_flexible_classroom, create a
index.htmlfile, which contains both the visual user interface and the programmable interface that uses the Agora Classroom SDK to implement the app logic.
To implement the app logic,copy the following code into
index.html, then replace
rtmToken with values that you get.
In the following code snippet, we do the following things:
Integrate the Agora Classroom SDK into your project through the CDN.
AgoraEduSDK.config method to configure the SDK globally. For the detailed description of parameters, see the API reference of
AgoraEduSDK.launch method to launch the classroom. For the detailed description of parameters, see the API reference of
index.html in your browser. You see the following page:
Not satisfied with the default UI of Flexible Classroom? Refer to Customize the UI of Flexible Classroom to get the source code of the Agora Classroom SDK, customize the UI with UIKit, and build a Classroom SDK on your own.
You can also use the low-code solution provided by Agora to launch a flexible classroom.