This section describes how to implement a web client for the teacher.


This flowchart shows the major logic of the following functions:

  • The teacher joins and leaves the classroom:

  • Recording:

Integrate the SDK

Refer to the following table to download the SDKs, and integrate the SDKs into your project.

Product SDK download Integration guide
RTC (Real-time Communication) SDK Agora SDK for Web Start a Video Call
RTM (Real-time Messaging) SDK Real-time Messaging SDK Peer-to-peer or Channel Messaging
Cloud Recording / Record by RESTful API
Agora Edu Cloud Service / Agora Edu Cloud Service quickstart
Whiteboard White SDK Whiteboard quickstart

Core API call sequence

Refer to the following diagram to implement the various functions in your project with the Agora RTC SDK, Agora RTM SDK, and Agora Edu Cloud Service.

Core API reference

  • Agora Edu Cloud Service
API Function
entry Enter a room.
get room info Get the room info.
change room info Change the room info.
change user info Change the user info.
  • Agora RTM SDK
API Function
createInstance Creates an RTM Client object.
login Logs into the Agora RTM system.
createChannel Creates an Agora RTM channel. You can create multiple channels with an RtmClient object.
join Joins an Agora RTM channel.
sendMessage Sends a channel message, which can be received by all the users in the channel.
leave Leaves the RTM channel.
  • Agora RTC SDK
API Function
createClient Creates an RTC Client object.
Client.init Initializes the RTC Client object.
createStream Creates a Stream object for sending and receiving audio and video.
Stream.init Initializes the Stream object.
Client.join Joins an Agora RTC channel.
Client.publish Publishes the local audio and video stream to SD-RTN.
Client.on("stream-added") Occurs when a remote audio or video stream is added to the channel.
Client.subscribe Subscribes to the remote audio or video stream. Plays the audio or video stream.
Client.leave Leaves the RTC channel.
The default channel profile of the Agora RTC SDK is Communication profile. Agora recommends using the Communication profile, no matter whether the teacher enables both the camera and the screen sharing.

Additional functions

For more features and functions available for an online class, you can refer to the following:

Monitor the network quality Use the on("network-quality") callback of the Agora RTC SDK to monitor the last-mile uplink and downlink network quality of every user in the channel. For more methods for reporting the real-time network quality, see the following guides:
  • Lastmile Tests
  • In-call Stats
  • Mute the local audio or video Call the following methods provided by the Agora RTC SDK:
  • muteAudio or unmuteAudio, to stop or resume sending the local video stream.
  • muteVideo or unmuteVideo, to stop or resume sending the local video stream.
  • Mute the remote audio or video Use both the Agora RTC SDK and Agora RTM SDK to implement this function:
    1. Call sendMessageToPeer on the teacher's client to send a peer-to-peer message to the student, asking them to mute their audio or video.
    2. Call the corresponding mute methods on the student's client to mute their local audio or video.
    Screen share Refer to the following documents on screen sharing:
  • Screen Sharing on Goole Chrome
  • Screen Sharing on Firefox
  • Whiteboard Implement the following whiteboard functions in your project:
  • Document conversion
  • Status Listen
  • Tools
  • Perspective Operation
  • Whiteboard Operation
  • Page (Scene) Management
  • Open-source demo project

    Agora provides an open-source demo for One-to-one Class on GitHub to download as a source code reference.