AgoraEduUserHandler
AgoraEduUserContext contains user-related event callbacks.
onRemoteUserJoined
Occurs when a remote user joins the room.
void onRemoteUserJoined(AgoraEduContextUserInfo userInfo)
Parameter
- userInfo
- For the information of the user who joins the room, see AgoraEduContextUserInfo.
onRemoteUserLeft
Occurs when a remote user leaves the room.
void onRemoteUserLeft(AgoraEduContextUserInfo user, AgoraEduContextUserInfo operator, AgoraEduContextUserLeaveReason reason)
Parameter
- user
- For the information of the user who leaves the room, see AgoraEduContextUserInfo.
- operator
- The operator: AgoraEduContextUserInfo. If the remote user is kicked out of the room, the SDK returns this parameter.
- reason
- The reason for leaving the room. See AgoraEduContextUserLeaveReason. The default reason is normal.
onUserUpdated
Occurs when the information of a user is updated.
void onUserUpdated(AgoraEduContextUserInfo user, AgoraEduContextUserInfo operator)
Parameter
- userInfo
- The AgoraEduContextUserInfo of the user whose information is changed.
- operator
- The operator AgoraEduContextUserInfo, which can be empty.
onCoHostUserListAdded
Occurs when users successfully go onto the "stage".
void onCoHostUserListAdded(Array<AgoraEduContextUserInfo> userList, AgoraEduContextUserInfo operator))
Parameter
- userList
- The list of users who are still on the "stage", which is an array of AgoraEduContextUserInfo.
- operator
- The operator AgoraEduContextUserInfo, which can be empty.
onCoHostUserListRemoved
Occurs when users go off the "stage".
void onCoHostUserListRemoved(Array<AgoraEduContextUserInfo> userList, AgoraEduContextUserInfo operator)
Parameter
- userList
- The list of users who are still on the "stage", which is an array of AgoraEduContextUserInfo.
- operator
- The operator AgoraEduContextUserInfo, which can be empty.
onUserPropertiesUpdated
Occurs when the custom user properties are updated.
void onUserPropertiesUpdated(AgoraEduContextUserInfo user, Map<String, String> changedProperties, Map<String, String> cause, AgoraEduContextUserInfo operator)
Parameter
- user
- The user information: AgoraEduContextUserInfo.
- changedProperties
- The updated user properties.
- cause
- The update reason.
- operator
- The operator AgoraEduContextUserInfo, which can be empty.
onUserPropertiesDeleted
Occurs when the custom user properties are deleted.
void onUserPropertiesDeleted(AgoraEduContextUserInfo user, Array<String> deletedProperties, Map<String, String> cause, AgoraEduContextUserInfo operator)
Parameter
- user
- The user information: AgoraEduContextUserInfo.
- deletedProperties
- Deleted properties.
- cause
- The reason for deletion.
- operator
- The operator AgoraEduContextUserInfo, which can be empty.
onUserRewarded
Occurs when the number of a user's rewards changes.
void onUserRewarded(AgoraEduContextUserInfo user, int rewardCount, AgoraEduContextUserInfo operator)
Parameter
- user
- The user information: AgoraEduContextUserInfo.
- rewardCount
- The number of rewards.
- operator
- The operator AgoraEduContextUserInfo, which can be empty.
onLocalUserKickedOut
Occurs when the local user is kicked out of the room.
void onLocalUserKickedOut()
When the local user is kicked out of the room, the SDK triggers this callback.
onHandsWaveEnabled
Indicates whether the "raising a handing" feature is enabled.
void onHandsWaveEnabled(Bool enabled)
When the "handing raising" feature is enabled, students in the room can "raise their hands" to apply for speak on "stage".
Parameter
- enabled
- Whether the "raising a handing" feature is enabled.
onUserHandsWave
Occurs when a user raises a hand.
void onUserHandsWave(String userUuid, Int duration, Map<String, Any> payload)
When a user raises a hand, the SDK triggers this callback.
Parameter
- fromUser
- The user who raises a hand: AgoraEduContextUserInfo.
- duration
- How long the hand is to be raised, in seconds.
onUserHandsDown
Occurs when a user puts down the hand.
void onUserHandsDown(AgoraEduContextUserInfo user)
- The student cancels the application for request on the "stage".
- The teacher accepts the student's application.
Parameter
- user
- The user whose hand is put down: AgoraEduContextUserInfo.