rtsRoom$onRoomStateChanged$withUid$state$extraInfo method

FutureOr<void> rtsRoom$onRoomStateChanged$withUid$state$extraInfo(
  1. ByteRTCRTSRoom rtsRoom,
  2. NSString roomId,
  3. NSString uid,
  4. NSInteger state,
  5. NSString extraInfo,
)

@detail callback @brief RTS 房间状态改变回调,加入房间、异常退出房间、发生房间相关的警告或错误时会收到此回调。 @param rtsRoom RTS 房间实例。 @param roomId 房间 ID。 @param uid 用户 ID。 @param state 房间状态码。
+ 0: 加入房间成功。
+ !0: 加入房间失败、异常退房、发生房间相关的警告或错误。 @param extraInfo 额外信息,如 {"elapsed":1187,"join_type":0}
- join_type 表示加入房间的类型,0为首次进房,1为重连进房。
- elapsed 表示加入房间耗时,即本地用户从调用 joinRTSRoom:userInfo:{@link #ByteRTCRTSRoom#joinRTSRoom:userInfo} 到加入 RTS 房间成功所经历的时间间隔,单位为 ms。

Implementation

FutureOr<void> rtsRoom$onRoomStateChanged$withUid$state$extraInfo(
    ByteRTCRTSRoom rtsRoom,
    NSString roomId,
    NSString uid,
    NSInteger state,
    NSString extraInfo) async {}