onJoinChannel method

void onJoinChannel(
  1. int result,
  2. int channelId,
  3. int elapsed,
  4. int uid
)

加入房间回调,表示客户端已经登入服务器。

result 0 表示加入房间成功;其他值表示加入房间失败,详细错误码请参考 NERtcErrorCode

channelId 客户端加入的房间 ID。

elapsed 加入房间总耗时,从 joinChannel 开始到发生此事件过去的时间,单位为毫秒。

uid 用户 ID。 如果在 NERtcEngine.joinChannel 方法中指定了 uid,此处会返回指定的 ID; 如果未指定 uid,此处将返回云信服务器自动分配的 ID。

Implementation

void onJoinChannel(int result, int channelId, int elapsed, int uid) {}