You need to enable JavaScript to run this app.
导航

错误码

最近更新时间2023.11.03 16:17:51

首次发布时间2022.09.14 20:26:33

ByteRTSErrorCode
typedef NS_ENUM(NSInteger, ByteRTSErrorCode)

回调错误码。
SDK 内部遇到不可恢复的错误时,会通过 rtcEngine:onError: 回调通知用户。

枚举值

类型说明
ByteRTSErrorCodeInvalidToken-1000Token 无效。
进房时使用的 Token 无效或过期失效。需要用户重新获取 Token,并调用
updateToken: 方法更新 Token。
ByteRTSErrorCodeJoinRoom-1001加入房间错误。
进房时发生未知错误导致加入房间失败。需要用户重新加入房间。
ByteRTSErrorCodeDuplicateLogin-1004相同用户 ID 的用户加入本房间,当前用户被踢出房间
ByteRTSErrorCodeKickedOut-1006服务端调用 OpenAPI 将当前用户踢出房间
ByteRTSErrorCodeRoomIdIllegal-1007当调用 createRtcRoom: ,如果 roomId 非法,会返回 null,并抛出该错误
ByteRTSErrorCodeTokenExpired-1009Token 过期。调用 joinRoomByKey:roomId:userInfo:rtcRoomConfig: 使用新的 Token 重新加入房间。
ByteRTSErrorCodeUpdateTokenWithInvalidToken-1010调用 updateToken: 传入的 Token 无效
ByteRTSErrorCodeRoomDismiss-1011服务端调用 OpenAPI 解散房间,所有用户被移出房间。
ByteRTSRoomAlreadyExist-1013通话回路检测已经存在同样 roomId 的房间了
ByteRTSUserIDDifferent-1014加入多个房间时使用了不同的 uid。

同一个引擎实例中,用户需使用同一个 uid 加入不同的房间。
ByteRTSErrorCodeAbnormalServerStatus-1084服务端异常状态导致退出房间。

SDK与信令服务器断开,并不再自动重连,可联系技术支持。
ByteRTSWarningCode
typedef NS_ENUM(NSInteger, ByteRTSWarningCode)

回调警告码。
警告码说明 SDK 内部遇到问题正在尝试恢复。警告码仅作通知。

枚举值

类型说明
ByteRTSWarningCodeJoinRoomFailed-2001进房失败。

初次进房或者由于网络状况不佳断网重连时,由于服务器错误导致进房失败。SDK 会自动重试进房。
ByteRTSWarningCodePublishStreamFailed-2002发布音视频流失败。
当你在所在房间中发布音视频流时,由于服务器错误导致发布失败。SDK 会自动重试发布。
ByteRTSWarningCodeSendCustomMessage-2011发送自定义广播消息失败,当前你未在房间中。
ByteRTSWarningCodeOldRoomBeenReplaced-2016新生成的房间已经替换了同样roomId的旧房间
ByteRTCLoginErrorCode
typedef NS_ENUM(NSInteger, ByteRTCLoginErrorCode)

登录结果

调用 login:uid: 登录的结果,会通过 rtcEngine:onLoginResult:errorCode:elapsed: 回调通知用户。

枚举值

类型说明
ByteRTCLoginErrorCodeSuccess0调用 login:uid: 方法登录成功。
ByteRTCLoginErrorCodeInvalidToken-1000调用 login:uid: 方法时使用的 Token 无效或过期失效。需要用户重新获取 Token。
ByteRTCLoginErrorCodeLoginFailed-1001登录错误

调用 login:uid: 方法时发生未知错误导致登录失败。需要用户重新登录。
ByteRTCLoginErrorCodeInvalidUserId-1002调用 login:uid: 方法时传入的用户 ID 有问题。
ByteRTCLoginErrorCodeServerError-1003调用 login:uid: 登录时服务器错误。
ByteRTCUserMessageSendResult
typedef NS_ENUM(NSInteger, ByteRTCUserMessageSendResult)

发送消息结果,成功或失败,及失败原因

枚举值

类型说明
ByteRTCUserMessageSendResultSuccess0发送消息成功
ByteRTCUserMessageSendResultTimeout1发送超时,没有发送。
ByteRTCUserMessageSendResultNetworkDisconnected2通道断开,没有发送
ByteRTCUserMessageSendResultNoReceiver3找不到接收方
ByteRTCUserMessageSendResultNoRelayPath4远端用户没有登录或进房
ByteRTCUserMessageSendResultExceedQPS5超过 QPS 限制
ByteRTCUserMessageSendResultNotJoin100消息发送方没有加入房间
ByteRTCUserMessageSendResultInit101连接未完成初始化
ByteRTCUserMessageSendResultNoConnection102没有可用的数据传输通道连接
ByteRTCUserMessageSendResultExceedMaxLength103消息超过最大长度,当前为64KB
ByteRTCUserMessageSendResultEmptyUser104接收消息的单个用户 id 为空
ByteRTCUserMessageSendResultNotLogin105房间外或应用服务器消息发送方没有登录
ByteRTCUserMessageSendResultServerParamsNotSet106发送消息给业务方服务器之前没有设置参数
ByteRTCUserMessageSendResultUnknown1000失败,未知错误。
ByteRTCRoomMessageSendResult
typedef NS_ENUM(NSInteger, ByteRTCRoomMessageSendResult)

房间内广播消息发送结果

枚举值

类型说明
ByteRTCRoomMessageSendResultSuccess200消息发送成功
ByteRTCRoomMessageSendResultTimeout1发送超时,没有发送
ByteRTCRoomMessageSendResultNetworkDisconnected2通道断开,没有发送
ByteRTCRoomMessageSendResultExceedQPS5超过 QPS 限制
ByteRTCRoomMessageSendResultNotJoin100失败,发送方未加入房间
ByteRTCRoomMessageSendResultInit101失败,连接未完成初始化。
ByteRTCRoomMessageSendResultNoConnection102失败,没有可用的连接。
ByteRTCRoomMessageSendResultExceedMaxLength103消息超过最大长度,当前为 64KB
ByteRTCRoomMessageSendResultUnknown1000失败,未知错误。