onRoomStateChangedWithReason property
FutureOr<void> Function(String roomId, String uid, RoomState state, RoomStateChangeReason reason)?
onRoomStateChangedWithReason
getter/setter pair
@hidden
@detail callback
@author shenpengliang
@brief Callback on room state changes. Via this callback you get notified of room relating warnings, errors and events. For example, the user joins the room, the user is removed from the room, and so on.
@param roomId Room ID.
@param uid User ID.
@param state Room state code. See RoomState{@link #RoomState}.
- 0: Join room success.
- 1: Failed to join a room, abnormal exit, room-related warnings or errors.
- 2: Leave room.
@param reason The reason why room state changes. See RoomStateChangeReason{@link #RoomStateChangeReason}.
Implementation
FutureOr<void> Function(String roomId, String uid, RoomState state,
RoomStateChangeReason reason)? onRoomStateChangedWithReason;