onUserJoined method

FutureOr<void> onUserJoined(
  1. dynamic userInfo
)
override

@detail callback @brief You will receive this callback in following cases:
- The remote user calls setUserVisibility{@link #RTCRoom#setUserVisibility} turns visible and joins your room. - The remote visible user is disconnected and then reconnected to your room. - The invisible remote user in your room calls setUserVisibility{@link #RTCRoom#setUserVisibility} and turns visible. - You join the room when there are visible users in the room. @param userInfo User information. See UserInfo{@link #UserInfo}.

Implementation

FutureOr<void> onUserJoined(dynamic userInfo) async {
  if ($instance == null || $instance is! IRTSRoomEventHandler) {
    return;
  }
  return ($instance as IRTSRoomEventHandler).onUserJoined?.call(packObject(
      userInfo,
      () => UserInfo.fromMap(UserInfo.deepPackedMapValues(
          UserInfo.mapMemberToConstructorParams(userInfo)))));
}