You need to enable JavaScript to run this app.
文档中心
实时音视频

实时音视频

复制全文
下载 pdf
iOS 3.60.104
错误码
复制全文
下载 pdf
错误码

ByteRTCNetworkDetectionStartReturn
typedef NS_ENUM(
    NSInteger,
    ByteRTCNetworkDetectionStartReturn
)

开始探测的返回值

startNetworkDetection:uplinkBandwidth:downlink:downlinkBandwidth: 返回对象类型

枚举值

类型说明
ByteRTCNetworkDetectionStartReturnSuccess0成功开始探测。
ByteRTCNetworkDetectionStartReturnParamErr1开始探测失败。参数错误,上下行探测均为 false,或期望带宽超过了范围 [100,10000]
ByteRTCNetworkDetectionStartReturnStreaming2开始探测失败。失败原因为,本地已经开始推拉流
ByteRTCNetworkDetectionStartReturnStarted3已经开始探测,无需重复开启
ByteRTCNNetworkDetectionStartReturnNotSupport4不支持该功能

ByteRTCPublicStreamErrorCode
typedef NS_ENUM(
    NSInteger,
    ByteRTCPublicStreamErrorCode
)

Deprecated since 3.60, see rtcEngine:onMixedStreamEvent:withMixedStreamInfo:withErrorCode:.

WTN 流状态码

枚举值

类型说明
ByteRTCPublicStreamErrorCodeSuccess0发布或订阅成功。
ByteRTCPublicStreamErrorCodePushParamError1191WTN 流的参数异常,请修改参数后重试。
ByteRTCPublicStreamErrorCodePushStatusError1192服务端状态异常,将自动重试。
ByteRTCPublicStreamErrorCodePushInternalError1193内部错误,不可恢复,请重试。
ByteRTCPublicStreamErrorCodePushError1195发布失败,将自动重试,请关注重试结果。
ByteRTCPublicStreamErrorCodePushTimeOut1196发布失败,10 s 后会重试,重试 3 次后自动停止。
ByteRTCPublicStreamErrorCodePullNoPushStream1300订阅失败,发布端未开始发布流。

ByteRTCAudioRecordingErrorCode
typedef NS_ENUM(
    NSInteger,
    ByteRTCAudioRecordingErrorCode
)

音频文件录制的错误码

枚举值

类型说明
ByteRTCAudioRecordingErrorCodeOk0录制正常
ByteRTCAudioRecordingErrorCodeNoPermission-1没有文件写权限
ByteRTCAudioRecordingErrorNotInRoom-2没有进入房间
ByteRTCAudioRecordingAlreadyStarted-3录制已经开始
ByteRTCAudioRecordingNotStarted-4录制还未开始
ByteRTCAudioRecordingErrorCodeNotSupport-5录制失败。文件格式不支持。
ByteRTCAudioRecordingErrorCodeOther-6其他异常

ByteRTCRoomMessageSendResult
typedef NS_ENUM(
    NSInteger,
    ByteRTCRoomMessageSendResult
)

房间内广播消息发送结果

枚举值

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

ByteRTCWarningCode
typedef NS_ENUM(
    NSInteger,
    ByteRTCWarningCode
)

回调警告码。

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

枚举值

类型说明
ByteRTCWarningCodePublishStreamFailed-2002发布音视频流失败。通过 rtcRoom:onVideoPublishStateChanged:info:state:reason:rtcRoom:onAudioPublishStateChanged:info:state:reason: 回调。
当你在所在房间中发布音视频流时,由于服务器错误导致发布失败。SDK 会自动重试发布。
ByteRTCWarningCodeSubscribeStreamFailed404-2003订阅音视频流失败。通过以下回调通知:rtcRoom:onVideoSubscribeStateChanged:info:state:reason:rtcRoom:onAudioSubscribeStateChanged:info:state:reason:
当前房间中找不到订阅的音视频流导致订阅失败。SDK 会自动重试订阅,若仍订阅失败则建议你退出重试。
ByteRTCWarningCodeSubscribeStreamFailed5xx-2004订阅音视频流失败。通过以下回调通知:rtcRoom:onVideoSubscribeStateChanged:info:state:reason:rtcRoom:onAudioSubscribeStateChanged:info:state:reason:
当你订阅所在房间中的音视频流时,由于服务器错误导致订阅失败。SDK 会自动重试订阅。
ByteRTCWarningCodePublishStreamForbidden-2009当调用 setUserVisibility: 将自身可见性设置为 false 后,再尝试发布流会触发此警告。通过 rtcRoom:onVideoPublishStateChanged:info:state:reason:rtcRoom:onAudioPublishStateChanged:info:state:reason: 回调。
ByteRTCWarningCodeSendCustomMessage-2011发送自定义广播消息失败,当前你未在房间中。
ByteRTCWarningCodeCodeUserNotifyStop-2013当房间内人数超过 500 人时,停止向房间内已有用户发送 rtcEngine:onUserJoined:elapsed:rtcEngine:onUserLeave:reason: 回调,并通过广播提示房间内所有用户。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
ByteRTCWarningCodeUserInPublish-2014用户已经在其他房间发布过流,或者用户正在发布 WTN 流。通过 rtcRoom:onVideoPublishStateChanged:info:state:reason:rtcRoom:onAudioPublishStateChanged:info:state:reason: 回调,提示kPublishStateChangeReasonNoPublishPermission 回调。
ByteRTCWarningCodeInEchoTestMode-2017当前正在进行回路测试,该接口调用无效
ByteRTCWarningCodeNoCameraPermission-5001摄像头权限异常,当前应用没有获取摄像头权限
ByteRTCWarningSetScreenAudioSourceTypeFailed-5009不支持在 publishScreenAudio: 之后,通过 setScreenAudioSourceType 设置屏幕音频采集类型
ByteRTCWarningSetScreenAudioStreamIndexFailed-5010不支持在 publishScreenAudio: 之后,通过 setScreenAudioStreamIndex 设置屏幕音频混流类型
ByteRTCWarningInvalidVoicePitch-5011设置语音音高不合法
ByteRTCWarningInvalidCallForExtAudio-5013外部音频源新旧接口混用
ByteRTCWarningCodeInvalidCanvasHandle-6001指定的内部渲染画布句柄无效。
当你调用 setLocalVideoCanvas:setRemoteVideoCanvas:withCanvas: 时指定了无效的画布句柄,触发此回调。
ByteRTCWarningCodeInvaildSamiAppkeyORToken-7002音频技术 SDK 鉴权失效。联系技术支持人员。
ByteRTCWarningCodeInvaildSamiResourcePath-7003音频技术 资源加载失败。传入正确的 DAT 路径,或联系技术支持人员。
ByteRTCWarningCodeLoadSamiLibraryFailed-7004音频技术 库加载失败。使用正确的库,或联系技术支持人员。
ByteRTCWarningCodeInvaildSamiEffectType-7005音频技术 不支持此音效。联系技术支持人员。
[deprecated] ByteRTCWarningCodeRoomAlreadyExist-2015Deprecated since 3.45 and will be deleted in 3.51.
同样 roomid 的房间已经存在了
[deprecated] ByteRTCWarningCodeNoMicrophonePermission-5002Deprecated since 3.33 and will be deleted in 3.51, use [ByteRTCMediaDeviceError](70088#ByteRTCMediaDeviceError).ByteRTCMediaDeviceErrorDeviceNoPermission instead.
已在 3.33 版本中废弃,使用 ByteRTCMediaDeviceError.ByteRTCMediaDeviceErrorDeviceNoPermission 代替。
麦克风权限异常,当前应用没有获取麦克风权限。
[deprecated] ByteRTCWarningCodeAudioDeviceManagerRecordingStartFail-5003Deprecated since 3.33 and will be deleted in 3.51, use [ByteRTCMediaDeviceError](70088#ByteRTCMediaDeviceError).ByteRTCMediaDeviceErrorDeviceFailure instead.
已在 3.33 版本中废弃,使用 ByteRTCMediaDeviceError.ByteRTCMediaDeviceErrorDeviceFailure 代替。
音频采集设备启动失败。
启动音频采集设备失败,当前设备可能被其他应用占用。
[deprecated] ByteRTCWarningCodeAudioDeviceManagerPlayoutStartFail-5004Deprecated since 3.33 and will be deleted in 3.51, use [ByteRTCMediaDeviceError](70088#ByteRTCMediaDeviceError).ByteRTCMediaDeviceErrorDeviceFailure instead.
已在 3.33 版本中废弃,使用 ByteRTCMediaDeviceError.ByteRTCMediaDeviceErrorDeviceFailure 代替.
音频播放设备启动失败警告。
可能由于系统资源不足,或参数错误。
[deprecated] ByteRTCWarningCodeNoRecordingDevice-5005Deprecated since 3.33 and will be deleted in 3.51, use [ByteRTCMediaDeviceError](70088#ByteRTCMediaDeviceError).ByteRTCMediaDeviceErrorDeviceNotFound instead.
已在 3.33 版本中废弃,使用 ByteRTCMediaDeviceError.ByteRTCMediaDeviceErrorDeviceNotFound 代替。
无可用音频采集设备。
启动音频采集设备失败,请插入可用的音频采集设备。
[deprecated] ByteRTCWarningCodeNoPlayoutDevice-5006Deprecated since 3.33 and will be deleted in 3.51, use [ByteRTCMediaDeviceError](70088#ByteRTCMediaDeviceError).ByteRTCMediaDeviceErrorDeviceNotFound instead.
已在 3.33 版本中废弃,使用 ByteRTCMediaDeviceError.ByteRTCMediaDeviceErrorDeviceNotFound 代替。
无可用音频播放设备。
启动音频播放设备失败,请插入可用的音频播放设备。
[deprecated] ByteRTCWarningCodeRecordingSilence-5007Deprecated since 3.33 and will be deleted in 3.51, use [ByteRTCMediaDeviceWarning](70088#ByteRTCMediaDeviceWarning).ByteRTCMediaDeviceWarningCaptureSilence instead.
已在 3.33 版本中废弃,使用 ByteRTCMediaDeviceWarning.ByteRTCMediaDeviceWarningCaptureSilence 代替。
当前音频设备没有采集到有效的声音数据,请检查更换音频采集设备。
[deprecated] ByteRTCWarningCodeMediaDeviceOperationDennied-5008Deprecated since 3.33 and will be deleted in 3.51, use [ByteRTCMediaDeviceWarning](70088#ByteRTCMediaDeviceWarning).ByteRTCMediaDeviceWarningOperationDenied instead.
已在 3.33 版本中废弃,使用 ByteRTCMediaDeviceWarning.ByteRTCMediaDeviceWarningOperationDenied 代替。
媒体设备误操作警告。
使用自定义采集时,不可调用内部采集开关,调用时触发此警告。

ByteRTCErrorCode
typedef NS_ENUM(
    NSInteger,
    ByteRTCErrorCode
)

回调错误码。

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

枚举值

类型说明
ByteRTCErrorCodeInvalidToken-1000Token 无效。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
调用 joinRoom:userInfo:userVisibility:roomConfig: 进房时使用的 Token 参数有误或过期失效。需要重新获取 Token,并调用 updateToken: 方法更新 Token。
ByteRTCErrorCodeJoinRoom-1001加入房间错误。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
进房时发生未知错误导致加入房间失败。需要用户重新加入房间。
ByteRTCErrorCodeNoPublishPermission-1002没有发布音视频流权限。通过以下回调通知:rtcRoom:onVideoPublishStateChanged:info:state:reason:rtcRoom:onAudioPublishStateChanged:info:state:reason:
用户在所在房间中发布音视频流失败,失败原因为用户没有发布流的权限。
ByteRTCErrorCodeNoSubscribePermission-1003没有订阅音视频流权限。通过以下回调通知:rtcRoom:onVideoSubscribeStateChanged:info:state:reason:rtcRoom:onAudioSubscribeStateChanged:info:state:reason:
用户订阅所在房间中的音视频流失败,失败原因为用户没有订阅流的权限。
ByteRTCErrorCodeDuplicateLogin-1004相同用户 ID 的用户加入本房间,当前用户被踢出房间。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
ByteRTCErrorCodeKickedOut-1006服务端调用 OpenAPI 将当前用户踢出房间。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
ByteRTCErrorCodeRoomIdIllegal-1007当调用 createRtcRoom: ,如果 roomId 非法,会返回 null,并抛出该错误。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
ByteRTCErrorCodeTokenExpired-1009Token 过期。加入房间后 Token 过期时,返回此错误码。需使用新的 Token 重新加入房间。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
ByteRTCErrorCodeUpdateTokenWithInvalidToken-1010调用 updateToken: 传入的 Token 无效。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
ByteRTCErrorCodeRoomDismiss-1011服务端调用 OpenAPI 解散房间,所有用户被移出房间。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
ByteRTCRoomAlreadyExist-1013通话回路检测已经存在同样 roomId 的房间了。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
ByteRTCUserIDDifferent-1014加入多个房间时使用了不同的 uid。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
同一个引擎实例中,用户需使用同一个 uid 加入不同的房间。
ByteRTCErrorCodeJoinRoomRoomForbidden-1025房间被封禁。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
ByteRTCErrorCodeJoinRoomUserForbidden-1026用户被封禁。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
ByteRTCErrorCodeOverStreamSubscribeLimit-1070订阅音视频流失败,订阅音视频流总数超过上限。通过以下回调通知:rtcRoom:onVideoSubscribeStateChanged:info:state:reason:rtcRoom:onAudioSubscribeStateChanged:info:state:reason:
游戏场景下,为了保证音视频通话的性能和质量,服务器会限制用户订阅的音视频流总数。当用户订阅的音视频流总数已达上限时,继续订阅更多流时会失败,同时用户会收到此错误通知。
ByteRTCErrorCodeOverStreamPublishLimit-1080发布流失败,发布流总数超过上限。通过 rtcRoom:onVideoPublishStateChanged:info:state:reason:rtcRoom:onAudioPublishStateChanged:info:state:reason: 回调。
RTC 系统会限制单个房间内发布的总流数,总流数包括视频流、音频流和屏幕流。如果房间内发布流数已达上限时,本地用户再向房间中发布流时会失败,同时会收到此错误通知。
ByteRTCErrorCodeAbnormalServerStatus-1084服务端异常状态导致退出房间。通过 rtcRoom:onRoomStateChanged:withUid:state:extraInfo: 回调。
SDK 与信令服务器断开,并不再自动重连,可联系技术支持。
[deprecated] ByteRTCErrorCodeOverVideoPublishLimit-1082Deprecated since 3.52, use ByteRTCErrorCodeOverStreamPublishLimit-1080)instead
发布视频流总数超过上限。
RTC 系统会限制单个房间内发布的视频流数。如果房间内发布视频流数已达上限时,本地用户再向房间中发布视频流时会失败,同时会收到此错误通知。
[deprecated] ByteRTCErrorCodInvalidAudioSyncUidRepeated-1083Deprecated since 3.60, use ByteRTCAVSyncEventInvalidUidRepeated = 0 carried by [rtcRoom:onAVSyncEvent:userId:eventCode:](70087#ByteRTCRoomDelegate-rtcroom-onavsyncevent-userid-eventcode) instead.
音视频同步失败。
当前音频源已与其他视频源关联同步关系。
单个音频源不支持与多个视频源同时同步。
通过 rtcRoom:onStreamStateChanged:withUid:state:extraInfo: 回调。

ByteRTCUserMessageSendResult
typedef NS_ENUM(
    NSInteger,
    ByteRTCUserMessageSendResult
)

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

枚举值

类型说明
ByteRTCUserMessageSendResultSuccess0发送消息成功。
ByteRTCUserMessageSendResultTimeout1消息发送失败。发送超时。
ByteRTCUserMessageSendResultNetworkDisconnected2消息发送失败。连接断开,消息未发出。
ByteRTCUserMessageSendResultNoReceiver3消息发送失败。找不到接收方。
ByteRTCUserMessageSendResultNoRelayPath4消息发送失败。远端用户没有登录或进房。
ByteRTCUserMessageSendResultExceedQPS5消息发送失败。超过 QPS 限制。
ByteRTCUserMessageSendResultE2BSSendFailed17消息发送失败。应用服务器未收到客户端发送的消息。
sendServerMessage/sendServerBinaryMessage 触发,通过 onServerMessageSendResult 回调。
ByteRTCUserMessageSendResultE2BSReturnFailed18消息发送失败。应用服务器接收到了客户端发送的消息,但响应失败。
sendServerMessage/sendServerBinaryMessage 触发,通过 onServerMessageSendResult 回调。
ByteRTCUserMessageSendResultNotJoin100消息发送失败。消息发送方没有加入房间。
ByteRTCUserMessageSendResultInit101消息发送失败。连接未完成初始化。
ByteRTCUserMessageSendResultNoConnection102消息发送失败。没有可用的数据传输通道连接。
ByteRTCUserMessageSendResultExceedMaxLength103消息发送失败。消息超过最大长度。默认消息最大长度为 1 KB;若启用了 RTS 高级功能,消息最大长度为 64 KB。
ByteRTCUserMessageSendResultEmptyUser104消息发送失败。接收方用户 ID 为空。
ByteRTCUserMessageSendResultNotLogin105消息发送失败。房间外或应用服务器消息发送方没有登录。
ByteRTCUserMessageSendResultServerParamsNotSet106消息发送失败。发送消息给业务方服务器之前没有设置参数。
ByteRTCUserMessageSendResultUnknown1000失败,未知错误。

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: 登录时服务器错误。

ByteRTCSingleStreamTaskErrorCode
typedef NS_ENUM(
    NSInteger,
    ByteRTCSingleStreamTaskErrorCode
)

单流转推直播错误码

枚举值

类型说明
ByteRTCSingleStreamTaskErrorCodeOK0推流成功。
ByteRTCSingleStreamTaskErrorCodeUnknownByServer1091服务端合流错误
ByteRTCSingleStreamTaskErrorCodeSignalRequestTimeout1092任务处理超时,请检查网络状态并重试。
ByteRTCSingleStreamTaskErrorCodeInvalidParamByServer1093服务端检测任务参数不合法
ByteRTCSingleStreamTaskErrorCodeRemoteKicked1094转推任务在目标房间的用户ID被踢出目标房间
ByteRTCSingleStreamTaskErrorCodeJoinDestRoomFailed1095转推任务加入目标房间失败
ByteRTCSingleStreamTaskErrorCodeReceiveSrcStreamTimeout1096转推任务在源房间拉流超时
ByteRTCSingleStreamTaskErrorCodeNotSurportCodec1097音视频编码转推任务不支持

ByteRTCMixedStreamTaskErrorCode
typedef NS_ENUM(
    NSInteger,
    ByteRTCMixedStreamTaskErrorCode
)

合流和 WTN 流任务错误码

枚举值

类型说明
ByteRTCMixedStreamTaskErrorCodeOK0推流成功。
ByteRTCMixedStreamTaskErrorCodeTimeOut1091任务处理超时,请检查网络状态并重试
ByteRTCMixedStreamTaskErrorCodeInvalidParamByServer1092服务端检测到错误的推流参数
ByteRTCMixedStreamTaskErrorCodeSubTimeoutByServer1093对流的订阅超时
ByteRTCMixedStreamTaskErrorCodeInvalidStateByServer1094合流服务端内部错误。
ByteRTCMixedStreamTaskErrorCodeAuthenticationByCDN1095合流服务端推 CDN 失败。
ByteRTCMixedStreamTaskErrorCodeUnKnownErrorByServer1096服务端未知错误。
ByteRTCMixedStreamTaskErrorCodeSignalRequestTimeout1097服务端接收信令超时,请检查网络状态并重试。
ByteRTCMixedStreamTaskErrorCodeMixImageFailed1098图片合流失败。
ByteRTCMixedStreamTaskErrorCodePushWTNFailed1195发布 WTN 流失败

ByteRTCSingleStreamTaskEvent
typedef NS_ENUM(
    NSUInteger,
    ByteRTCSingleStreamTaskEvent
)

单流转推直播事件

枚举值

类型说明
ByteRTCSingleStreamTaskEventStartSuccess1任务发起成功。
ByteRTCSingleStreamTaskEventStartFailed2任务发起失败。
ByteRTCSingleStreamTaskEventStopSuccess3任务停止。
ByteRTCSingleStreamTaskEventStopFailed4结束任务失败。
ByteRTCSingleStreamTaskEventWarning5Warning 事件

ByteRTCSubtitleErrorCode
typedef NS_ENUM(
    NSInteger,
    ByteRTCSubtitleErrorCode
)

字幕任务错误码。

枚举值

类型说明
ByteRTCSubtitleErrorCodeUnknow-1客户端无法识别云端媒体处理发送的错误码。
ByteRTCSubtitleErrorCodeSuccess0字幕已开启。
ByteRTCSubtitleErrorCodePostProcessError1云端媒体处理内部出现错误,请联系技术支持。
ByteRTCSubtitleErrorCodeASRConnectionError2第三方服务连接失败,请联系技术支持。
ByteRTCSubtitleErrorCodeASRServiceError3第三方服务内部出现错误,请联系技术支持。
ByteRTCSubtitleErrorCodeBeforeJoinRoom4未进房导致调用startSubtitle失败。请加入房间后再调用此方法。
ByteRTCSubtitleErrorCodeAlreadyOn5字幕已开启,无需重复调用 startSubtitle
ByteRTCSubtitleErrorCodeUnsupportedLanguage6用户选择的目标语言目前暂不支持。
ByteRTCSubtitleErrorCodePostProcessTimeout7云端媒体处理超时未响应,请联系技术支持。

ByteRTSWarningCode
typedef NS_ENUM(
    NSInteger,
    ByteRTSWarningCode
)

回调警告码。

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

枚举值

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

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 解散房间,所有用户被移出房间。
ByteRTSErrorRoomAlreadyExist-1013通话回路检测已经存在同样 roomId 的房间了
ByteRTSErrorUserIDDifferent-1014加入多个房间时使用了不同的 uid。
同一个引擎实例中,用户需使用同一个 uid 加入不同的房间。
ByteRTSErrorCodeAbnormalServerStatus-1084服务端异常状态导致退出房间。
SDK 与信令服务器断开,并不再自动重连,可联系技术支持。
最近更新时间:2026.05.22 16:04:09
这个页面对您有帮助吗?
有用
有用
无用
无用