RoomContext
enables developers to implement classroom management.
joined: boolean;
Since v1.1.5.
Whether the local client successfully joins the class.
startCarousel: ({
range,
type,
interval,
}: {
range: number;
type: number;
interval: number;
}) => Promise<any>;
Since v1.1.5.
Enables the feature of students automatically going onto the "stage". Once the teacher or TA enables this feature, students go onto the "stage" at specified intervals. This feature is only applicable to the Small Classroom scenario. If the number of students in the classroom is less than or equal to 6, after calling this method, all students go onto the "stage" after an interval
, but cannot be rotated.
Parameter | Description |
---|---|
range |
Scope of students who automatically go onto the "stage":1 : All students in the classroom.2 : All students whose cameras are not disabled. |
type |
Order of students going onto the "stage": |
interval |
The interval (seconds) for students going onto the "stage". The default value is 60. The value range is 10 to 99. |
stopCarousel: () => Promise<any>;
Since v1.1.5.
Disables the feature of students automatically going onto the "stage".
sceneType: number,
The classroom type:
0
: One-to-one Classroom.2
: Lecture Hall.4
: Small Classroom.async destroyRoom(): void
Destroy the classroom.
async joinRoom(): void
Join a classroom.
async startNativeScreenShareBy(windowId: number): void
Start screen sharing by the window ID.
Parameter | Description |
---|---|
windowId |
The window ID。 |
async teacherAcceptHandsUp(userUuid: string): void
Kicks a student out of the classroom and prohibits the student from re-joining the classroom.
Parameter | Description |
---|---|
userUuid |
The student ID. |
async teacherRejectHandsUp(userUuid: string): void
Kicks a student out of the classroom. The student who is kicked out of the classroom can re-join the classroom.
Parameter | Description |
---|---|
userUuid |
The student ID. |
roomUuid |
The room ID. |
liveClassStatus: {
classState: string;
duration: number;
},
Deprecated as of v1.1.5. Use
liveClassStatus
inLiveRoomStatsContext
instead.
The current state of the classroom.
queryCameraDeviceState: (userList: EduUser[], userUuid: string, streamUuid: string) => any;
Since v1.1.5.
Gets the camera state.
queryMicrophoneDeviceState: (userList: EduUser[], userUuid: string, streamUuid: string) => any;
Since v1.1.5.
Gets the microphone status.
isJoiningRoom: boolean,
handsUpStudentList: array<{userUuid, userName, coVideo}>,
The list of students who raise their hand to apply for speaking up.
processUserCount: number,
The total number of users who are sending video streams.
roomInfo: object,
The information of the current classroom.
isCourseStart: boolean,
Whether the class has started.
async kickOutOnce(userUuid: string, roomUuid: string): void
Kicks a student out of the classroom. The student who is kicked out of the classroom can re-join the classroom.
Parameter | Description |
---|---|
userUuid |
The student ID. |
roomUuid |
The room ID. |
async kickOutBan(userUuid: string, roomUuid: string): void
Kicks a student out of the classroom and prohibits the student from re-joining the classroom.
Parameter | Description |
---|---|
userUuid |
The student ID. |
roomUuid |
The room ID. |
liveClassStatus: object,
The current state of the classroom.
async muteVideo(userUuid: string, isLocal: boolean): void
Disable the video of the specified user.
Parameter | Description |
---|---|
userUuid |
The user ID. |
isLocal |
Whether the user is the local user. |
async unmuteVideo(userUuid: string, isLocal: boolean): void
Enable the video of the specified user.
Parameter | Description |
---|---|
userUuid |
The user ID. |
isLocal |
Whether the user is the local user. |
async muteAudio(userUuid: string, isLocal: boolean): void
Disable the audio of the specified user.
Parameter | Description |
---|---|
userUuid |
The user ID. |
isLocal |
Whether the user is the local user. |
async unmuteAudio(userUuid: string, isLocal: boolean): void
Enable the audio of the specified user.
Parameter | Description |
---|---|
userUuid |
The user ID. |
isLocal |
Whether the user is the local user. |