Supplementary Explanation
Supplementary Explanation
Explanation of Chat Message Forwarding Rules
Explanation of Multi-video Mode
- If the chat message data within 1 second exceeds 100 messages, the messages after the first 100 will be discarded (except for teachers and teaching assistants, who will receive the complete set of chat messages). For example, if 150 messages are received within 1 second, everyone except teachers and teaching assistants will only receive the first 100 messages. If 90 messages are received in the next second, all users will receive these 90 messages.
Explanation of Large Room (Large-scale Room) Mode
Related Logic:TK.EVENT_TYPE.roomModeChanged, getUser, getUsers, getRoomUsers, getRoomUserNum
- Conditions for Enabling Large Room Mode:
- The number of participants exceeds 100 people. [Note: Once the number of people exceeds 100, the system switches to Large Room mode. Once Large Room mode is activated, the room mode will not be changed, i.e., it will not switch back to the regular mode even if the number of people falls below 100.]
- If the room type is a Live Room, Large Live Room, or Cloud Live Room, it will initially be in Large Room mode.
- In Large Room mode, notifications for user join/leave messages are not sent (i.e., the events TK.EVENT_TYPE.roomParticipantJoin and TK.EVENT_TYPE.roomParticipantLeave are no longer dispatched). Therefore, in Large Room mode, the user list for everyone is incomplete. As a result, the calls to the getUsers and getUser interfaces should be made according to actual needs. It is recommended to use getRoomUsers and getRoomUserNum in Large Room mode to obtain specified users and the number of users. [Note: Users who are on stage will definitely be in the user list, so the getUser interface can be used to retrieve users who are on stage.]
- In Large Room mode, if the toId of changeUserProperty is set to TK.MSG_TO_ALLUSER or TK.MSG_TO_ALLEXCEPTSENDER, then changes to the user properties of users who are not on stage are only forwarded to the caller (i.e., the one who called changeUserProperty) and the target user (i.e., the user whose properties are being changed). However, if the user properties of a user who is on stage (i.e., a user who is publishing audio/video) are changed, the changes will be forwarded to the specified users according to the toId.
- In Large Room mode, it is not recommended that anyone other than the teacher and teaching assistants send signaling with a toId of TK.MSG_TO_ALLUSER (or TK.MSG_TO_ALLEXCEPTSENDER). For example, in a quiz scenario: after the teacher initiates the quiz and the students start answering, it is not recommended that students' quiz submissions be sent to everyone. Instead, it is suggested that they be sent only to the teacher (or teaching assistants) with a toId of TK.MSG_TO_ALLSUPERUSERS.
- In Large Room mode, it is not recommended to change the properties of users who are not on stage. It is suggested to only change the properties of users who are on stage
xplanation of Multi-video Mode
Related Logic:publishVideo, unpublishVideo, playVideo, unplayVideo, getVideoProfile, setVideoProfile, setLocalVideoMirror - Conditions for enabling multi-video mode: The tk_multistream configuration item is set to true in the init method. - Functions of Multi-video Mode: It allows publishing and playing videos from multiple cameras. - Differences between Multi-video Mode and Single-video Mode: - In multi-video mode, you can publish or play videos from multiple cameras. - In multi-video mode, the videoinput set by the setDevices method is used to configure the primary camera. Setting the primary camera means associating the audio with this primary camera. Since there is no issue of switching cameras in multi-video mode, the videoinput switched by this interface is for switching the primary camera (i.e., switching the camera associated with the audio).