tencent cloud

All product documents
Low-code Interactive Classroom
Event Listening
Last updated: 2024-03-13 21:00:41
Event Listening
Last updated: 2024-03-13 21:00:41
The function of event listening:
In actual business requirements, you may need to combine with the business when a specific event occurs, for example:
When the class officially starts, do some reporting to the business background.
When a member joins a room, a pop-up window is shown to the member.

Event List (TCIC.TMainEvent)

Event
Event
Remark
After_Enter
Joined room
-
Modify_Class
Room information has been changed
-
Leave_Class
Leaving the room
-
Kick_Out_By_Teacher
Kicked out of the room
-
Kick_Out_By_Another
Kicked out of the room after multi-terminal login
-
Kick_Out_By_Expire
Kicked out of the room due to expired signature
-
Member_Join
Members join the room
-
Member_Exit
Members leave the room
-
Member_Info_Update
Member information update
-
Member_Hand_Up
Members raise hands
-
Member_Hand_Up_Cancel
Members withdraw hand raising
-
Question_Valid
There are available answers
-
Question_Begin
Answering started
-
Question_End
Answering ended
-
Question_Abandon
Answering terminated
-
Question_Close
Answering closed
-
Question_Been_Answered
A student is answering
-
App_Resized
Application size changes
-
Error
An error occurred (affecting the main process)
-
Recv_IM_Msgs
Received an IM message
-
Recv_Custom_IM_Msg
Received a custom IM message
-
Sample:
function afterEnter() => {
console.debug('You have joined this room');
}

// Listen
TCIC.SDK.instance.on(TCIC.TMainEvent.After_Enter, afterEnter);

// Cancel listening
TCIC.SDK.instance.off(TCIC.TMainEvent.After_Enter, afterEnter);

Status list (TCIC.TMainState)

Event
Event
Remark
Class_Info_Ready
Classroom information has been loaded
-
Joined_Class
Already joined the classroom
-
Sub_Camera
Auxiliary camera status
0: Start
2: End
Screen_Share
Screen sharing status
0: Sharing
1: Pausing
2: Not started/Ended
Video_Publish
Whether local video push is enabled
-
Audio_Capture
Whether local audio collection is enabled
-
Class_Duration
Classroom duration
Unit: second.
< 0: Time until class starts
0: Class not started at the class time|Class ended|Class expired
> 0: In class
Member_Count
Number of class members
-
Board_Permission
Permission to whiteboard operations
-
Chat_Permission
Permission to text chat
-
Screen_Share_Permission
Screen sharing permissions
-
Hand_Up
Hand raising status
-
Mute_All
All-member mute status
-
Mute_Video_All
All-member video status
-
Silence_All
All-member silent status
-
Message_Unread_Count
Unread Messages
-
HandUp_Count
Number of people raising hands
-
// PromiseState can ensure that it will be executed immediately when the current state meets the conditions
TCIC.SDK.instance.promiseState(TCIC.TMainState.Joined_Class, true).then( () => {
console.debug('You have joined this room');
});


function listener() {
console.debug('You have joined this room');
}
// Listen
TCIC.SDK.instance.subscribeState(TCIC.TMainState.Joined_Class, listener);

// Cancel listening
TCIC.SDK.instance.unsubscribeState(TCIC.TMainState.Joined_Class, listener);


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support