• Public
  • Public/Protected
  • All

Edu Store Typescript API Reference for Web

This document only applies to the Agora Classroom SDK v2.3.x or later versions.

Starting from Classroom SDK version 2.0.x, the Edu Store is used to provide capability support for the interaction layer on the web side, corresponding to the Edu Context on the iOS and Android side. Different stores represent different functional modules in Flexible Classroom. Each store includes observable properties and classroom APIs for app invocation.

Cloud Drive Store

The CloudDriveStore class provides abilities related the cloud drive.

Core methods

Method Description
CloudDriveStore.cancelUpload Cancels uploading the file
CloudDriveStore.fetchPersonalResources Gets all personal resources
CloudDriveStore.removePersonalResources Removes files from personal resources
CloudDriveStore.retryUpload Retries uploading the file
CloudDriveStore.uploadPersonalResource Uploads a file to personal resources
CloudDriveStore.calcResourceUuid Computing resource file UUID

Observable properties

Property Description
CloudDriveStore.personalResources Cloud disk personal resource file list
CloudDriveStore.uploadProgress Cloud disk resource upload progress

Group Store

The GroupStore class provides abilities related to breakout rooms.

Core methods

Method Description
GroupStore.acceptGroupInvite Accepts the invitation of joining a group
GroupStore.addGroups Creates a group
GroupStore.joinSubRoom Joins a group
GroupStore.leaveSubRoom Leaves the group
GroupStore.moveIntoSubRoom A user moves from a group to another group
GroupStore.moveUsersToGroup Moves users from a group to another group
GroupStore.rejectGroupInvite Rejects the invitation of joining a group
GroupStore.removeGroupUsers Removes users from a group
GroupStore.removeGroups Removes groups
GroupStore.startGroup Starts the breakout session
GroupStore.stopGroup Stops the breakout session
GroupStore.updateGroupInfo Updates the grouping options
GroupStore.updateGroupUsers Updates the grouping options

Observable properties

Property Description
GroupStore.state Group state
GroupStore.groupDetails Group details and users

Hand Up Store

The HandUpStore class provides abilities related to the hand-raising feature.

Core methods

Method Description
HandUpStore.cancelHandUp The student lowers the hand to cancel the application for speaking up
HandUpStore.offPodium Lets a student "go off the stage"
HandUpStore.offPodiumAll Lets all students "go off the stage"
HandUpStore.onPodium Allows a student to "go onto the stage"
HandUpStore.rejectHandUp The teacher rejects the student's application for speaking up
HandUpStore.waveArm The student wave's an arm

Media Store

The MediaStore class is used for processing media streams.

Core methods

Method Description
MediaStore.enableLocalAudio Enables or disables the local audio device
MediaStore.enableLocalVideo Enables or disables the local video device
MediaStore.getWindowDevices Gets the window IDs which can be shared
MediaStore.hasScreenSharePermission Whether has the permission of sharing the screen
MediaStore.isScreenDeviceEnumerateSupported Whether screen sharing is supported
MediaStore.setupLocalScreenShare Sets a node for rendering the local screen-sharing stream
MediaStore.startScreenShareCapture Starts sharing the screen
MediaStore.stopScreenShareCapture Stops sharing the screen
MediaStore.updateLocalMediaState Updates the local media state
MediaStore.enableDualStream Enables the dual-stream mode
MediaStore.setLowStreamParameter Sets low quality stream parameters
MediaStore.setMirror Sets local view to display mirror
MediaStore.addAudioRawDataObserver Adds an audio raw data observer
MediaStore.removeAudioRawDataObserver Removes an audio raw data observer
MediaStore.setupLocalVideo Renders local video

Observable properties

Property Description
MediaStore.videoCameraDevices AGRtcDeviceInfo
MediaStore.audioRecordingDevices Video capture device
MediaStore.audioRecordingDevices Audio capture device
MediaStore.audioPlaybackDevices Audio playing device
MediaStore.cameraDeviceId Current video capture device ID
MediaStore.recordingDeviceId Current audio capture device ID
MediaStore.playbackDeviceId Current audio playing device ID
MediaStore.localCameraTrackState Status of the local video capture device
MediaStore.localMicTrackState Status of the local audio capture device
MediaStore.localScreenShareTrackState Status of the local screen capture device
MediaStore.localScreenShareAudioTrackState Status of the local playback capture device
MediaStore.currentScreenShareDevice Current capture screen device
MediaStore.localMicAudioVolume Local audio device volume
MediaStore.localPlaybackTestVolume Local speaker volume
MediaStore.isMirror Whether the video is mirrored

Recording Store

The RecordingStore class provides recording-related abilities.

Core methods

Method Description
RecordingStore.startRecording Starts recording
RecordingStore.stopRecording Stops recording

Room Store

The RoomStore class is used for initializing rooms and listening for the room data.

Core methods

Method Description
RoomStore.sendRewards Sends rewards to users
RoomStore.startCarousel Starts the video carousel rotation on stage
RoomStore.stopCarousel Stops the video carousel rotation on stage
RoomStore.updateClassState Updates the class state
RoomStore.updateFlexProperties Updates room flex properties

Observable properties

Property Description
RoomStore.carousel stage carousel setting
RoomStore.expandedScope video gallery
RoomStore.waveArmList List of waving arm users
RoomStore.acceptedList List of users on the stage
RoomStore.flexProps Flexible room properties
RoomStore.recordStatus Recording status
RoomStore.recordReady Whether the recording is ready
RoomStore.recordStreamingUrl The recording video stream url
RoomStore.screenShareStreamUuid Current stream UUID of screen sharing taking place in the classroom
RoomStore.screenShareUserUuid The user to whom the stream of screen sharing currently taking place in the classroom belongs
RoomStore.isOnPodium Whether the current user is on the stage

Statistics Store

The StatisticsStore class provides network statistics.

Observable properties

Property Description
StatisticsStore.packetLoss Packet Loss Rate
StatisticsStore.uplinkNetworkQuality Uplink network quality
StatisticsStore.downlinkNetworkQuality Downlink network quality
StatisticsStore.cpu Application CPU usage
StatisticsStore.cpuTotal System CPU usage
StatisticsStore.delay Network delay

Stream Store

The StreamStore class is used for managing media streams.

Core methods

Method Description
StreamStore.updateExpandedScopeAndStreams Updates the video gallery switch status and stream user list in the video gallery window
StreamStore.initializeScreenShareStream Initializes the screen sharing stream
StreamStore.destroyScreenShareStream Destroys the screen sharing stream
StreamStore.setRemoteVideoStreamType Sets the remote video quality type
StreamStore.setupRemoteVideo Renders remote video
StreamStore.muteRemoteVideoStream Subscribes to/unsubscribes from remote video streams
StreamStore.muteRemoteAudioStream Subscribes to/unsubscribes from remote audio streams
StreamStore.muteRemoteVideoStreamMass Bulk subscription
StreamStore.updateLocalPublishState Updates local audio and video publishing status
StreamStore.updateRemotePublishState Updates remote audio and video publishing status
StreamStore.publishStreamToCdn Pushes the currently published stream to the CDN
StreamStore.publishScreenShare Creates and publishes a screen sharing stream
StreamStore.unpublishScreenShare Unpublishes the screen share stream
StreamStore.setLatencyLevel Sets stream delay level

Observable properties

Property Description
StreamStore.streamByStreamUuid Stream list indexed by stream UUID
StreamStore.streamByUserUuid Streams of list indexed by user UUID
StreamStore.streamVolumes Stream volumes
StreamStore.localCameraStreamUuid Local camera video stream UUID
StreamStore.localMicStreamUuid Local microphone video stream UUID
StreamStore.localShareStreamUuid Local screen share video stream UUID
StreamStore.shareStreamToken Local screen sharing token

User Store

The UserStore class is used for managing users.

Core methods

Method Description
UserStore.fetchUserList Gets the user list
UserStore.kickOutOnceOrBan Kicks a user out of the room
UserStore.updateUserProperties Updates users properties

Observable properties

Property Description
UserStore.localUser Local user
UserStore.users Users in the room
UserStore.userCount User count of the room
UserStore.teacherList Teacher list
UserStore.studentList Student list
UserStore.assistantList Assistant list
UserStore.rewards Rewards count indexed by user UUID

Connection Store

The ConnectionStore class is used for managing connection states.

Core methods

Method Description
ConnectionStore.checkIn Sets the check-in data
ConnectionStore.initialize Initializes RteEngine
ConnectionStore.joinClassroom Joins the room channel
ConnectionStore.joinRTC Joins the RTC channel of the room
ConnectionStore.leaveClassroom Leaves the room channel
ConnectionStore.leaveRTC Leaves the RTC channel of the room
ConnectionStore.addCloudProxyObserver Adds an observer for cloud proxy
ConnectionStore.removeCloudProxyObserver Removes an observer for cloud proxy

Observable properties

Property Description
ConnectionStore.classroomState Room connection status
ConnectionStore.rtcState RTC connection status
ConnectionStore.scene Room object
ConnectionStore.engine RTE Engine