IRoomHandler

The IRoomHandler class contains room-related event callbacks.

onJoinRoomSuccess

Occurs when the local user successfully joins the room.

fun onRoomJoinSuccess(roomInfo: EduContextRoomInfo)

Parameter

roomInfo
The room information: EduContextRoomInfo.

onJoinRoomFailure

Occurs when the local user fails to join the room.

fun onRoomJoinFail(roomInfo: EduContextRoomInfo, error: EduContextError)

Parameter

roomInfo
The room information: EduContextRoomInfo.
error
The reason why the user fails to join the room: EduContextError.

onRoomPropertiesUpdated

Occurs when the custom room properties are updated.

fun onRoomPropertiesUpdated(properties: Map<String, Any>,
                            cause: Map<String, Any>?,
                            operator: AgoraEduContextUserInfo?)

Parameter

properties
The updated room properties.
cause
The update reason.
operator
The operator AgoraEduContextUserInfo, which can be empty.

onRoomPropertiesDeleted

Occurs when custom room properties are deleted.

fun onRoomPropertiesDeleted(properties: List<String>,
                            cause: Map<String, Any>?,
                            operator: AgoraEduContextUserInfo?)

Parameter

properties
The keyPath array of the deleted properties.
cause
The reason for deletion.
operator
The operator AgoraEduContextUserInfo, which can be empty.

onRoomClosed

Occurs when the room is closed.

fun onRoomClosed()

When the room is closed, users in the room are kicked out of the room immediately, and other users can no longer join the room.