public class com.ss.bytertc.engine.handler.IRTCEngineEventHandler.ErrorCode
回调错误码。 SDK 内部遇到不可恢复的错误时,会通过 onError 回调通知用户。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.ErrorCode.ERROR_CODE_INVALID_TOKEN = -1000;
Token 无效。 调用 joinRoom 方法时使用的 Token 无效或过期失效。需要用户重新获取 Token,并调用 UpdateTokenupdateToken 方法更新 Token。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.ErrorCode.ERROR_CODE_JOIN_ROOM = -1001;
加入房间错误。 调用 joinRoom 方法时发生未知错误导致加入房间失败。需要用户重新加入房间。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.ErrorCode.ERROR_CODE_NO_PUBLISH_PERMISSION = -1002;
没有发布音视频流权限。 用户在所在房间中发布音视频流失败,失败原因为用户没有发布流的权限。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.ErrorCode.ERROR_CODE_NO_SUBSCRIBE_PERMISSION = -1003;
没有订阅音视频流权限。 用户订阅所在房间中的音视频流失败,失败原因为用户没有订阅流的权限。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.ErrorCode.ERROR_CODE_DUPLICATE_LOGIN = -1004;
用户重复登录。 本地用户所在房间中有相同用户 ID 的用户登录,导致本端用户被踢出房间。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.ErrorCode.ERROR_CODE_APP_ID_NULL = -1005;
App ID 参数异常。 创建引擎时传入的 App ID 参数为空。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.ErrorCode.ERROR_CODE_OVER_SUBSCRIBE_LIMIT = -1070;
订阅音视频流失败,订阅音视频流总数超过上限。 游戏场景下为了保证音视频通话的性能和质量,服务器会限制用户订阅的音视频流的总数。当用户订阅的音视频流总数已达上限时,继续订阅更多流时会失败,同时用户会收到此错误通知。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.ErrorCode.ERROR_CODE_OVER_STREAM_PUBLISH_LIMIT = -1080;
发布流失败,发布流总数超过上限。 RTC 系统会限制单个房间内发布的总流数,总流数包括视频流、音频流和屏幕流。如果房间内发布流数已达上限时,本地用户再向房间中发布流时会失败,同时会收到此错误通知。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.ErrorCode.ERROR_CODE_OVER_SCREEN_PUBLISH_LIMIT = -1081;
发布屏幕流失败,发布流总数超过上限。 RTC 系统会限制单个房间内发布的总流数,总流数包括视频流、音频流和屏幕流。如果房间内发布流数已达上限时,本地用户再向房间中发布流时会失败,同时会收到此错误通知。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.ErrorCode.ERROR_CODE_OVER_VIDEO_PUBLISH_LIMIT = -1082;
发布视频流总数超过上限。 RTC 系统会限制单个房间内发布的视频流数。如果房间内发布视频流数已达上限时,本地用户再向房间中发布视频流时会失败,同时会收到此错误通知。
public static class com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode
回调警告码。 警告码说明 SDK 内部遇到问题正在尝试恢复。警告码仅作通知。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_JOIN_ROOM_FAILED = -2001;
进房失败。
当你调用 joinRoom 初次进房或者由于网络状况不佳断网重连时,由于服务器错误导致进房失败。SDK 会自动重试进房。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_PUBLISH_STREAM_FAILED = -2002;
发布音视频流失败。
当你在所在房间中发布音视频流时,由于服务器错误导致发布失败。SDK 会自动重试发布。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_SUBSCRIBE_STREAM_FAILED404 = -2003;
订阅音视频流失败。
当前房间中找不到订阅的音视频流导致订阅失败。SDK 会自动重试订阅,若仍订阅失败则建议你退出重试。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_SUBSCRIBE_STREAM_FAILED5XX = -2004;
订阅音视频流失败。
当你订阅所在房间中的音视频流时,由于服务器错误导致订阅失败。SDK 会自动重试订阅。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_PUBLISH_STREAM_FORBIDEN = -2009;
当调用 setUserVisibility 将自身可见性设置为 false 后,再尝试发布流会触发此警告。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_SEND_CUSTOM_MESSAGE = -2011;
发送自定义广播消息失败, 当前你未在房间中。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_RECEIVE_USER_NOTIFY_STOP = -2013;
当房间内人数超过 500 人时,停止向房间内已有用户发送 onUserJoined 和 onUserLeave 回调,并通过广播提示房间内所有用户。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_NO_CAMERA_PERMISSION = -5001;
摄像头权限异常,当前应用没有获取摄像头权限。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_NO_MICROPHONE_PERMISSION = -5002;
麦克风权限异常,当前应用没有获取麦克风权限。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_RECODING_DEVICE_START_FAILED = -5003;
音频采集设备启动失败。
启动音频采集设备失败,当前设备可能被其他应用占用。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_PLAYOUT_DEVICE_START_FAILED = -5004;
音频播放设备启动失败警告。
可能由于系统资源不足,或参数错误。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_NO_RECORDING_DEVICE = -5005;
无可用音频采集设备。
启动音频采集设备失败,请插入可用的音频采集设备。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_NO_PLAYOUT_DEVICE = -5006;
无可用音频播放设备。
启动音频播放设备失败,请插入可用的音频播放设备。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_RECORDING_SILENCE = -5007;
当前音频设备没有采集到有效的声音数据,请检查更换音频采集设备。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_MEDIA_DEVICE_OPERATION_DENIED = -5008;
媒体设备误操作警告。
使用自定义采集时,不可调用内部采集开关,调用时将触发此警告。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_SET_SCREEN_AUDIO_SOURCE_TYPE_FAILED = -5009;
不支持在 publishScreen 之后,调用 setScreenAudioSourceType 设置屏幕音频采集类型
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.WarningCode.WARNING_CODE_SET_SCREEN_STREAM_INDEX_FAILED = -5010;
不支持在 publishScreen 之后,调用 setScreenAudioStreamIndex 设置屏幕音频共享发布类型
public class com.ss.bytertc.engine.handler.IRTCEngineEventHandler.TranscodingError
转推直播功能错误码。
| 类型 | 名称 |
|---|---|
| int | TRANSCODING_ERROR_OK |
| int | TRANSCODING_ERROR_INVALID_ARGUMENT |
| int | TRANSCODING_ERROR_SUBSCRIBE |
| int | TRANSCODING_ERROR_PROCESSING |
| int | TRANSCODING_ERROR_PUBLISH |
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.TranscodingError.TRANSCODING_ERROR_OK = 0;
推流成功。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.TranscodingError.TRANSCODING_ERROR_INVALID_ARGUMENT = 1;
推流参数错误。你必须更新合流参数并重试。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.TranscodingError.TRANSCODING_ERROR_SUBSCRIBE = 2;
和 RTC 服务端建立连接失败。会自动重连
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.TranscodingError.TRANSCODING_ERROR_PROCESSING = 3;
合流服务中间过程存在错误,建议重试。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.TranscodingError.TRANSCODING_ERROR_PUBLISH = 4;
推流失败,可以等待服务端重新推流。
public class com.ss.bytertc.engine.handler.IRTCEngineEventHandler.LoginErrorCode
登录结果
调用 login 登录的结果,会通过 onLoginResult 回调通知用户。
| 类型 | 名称 |
|---|---|
| int | LOGIN_ERROR_CODE_SUCCESS |
| int | LOGIN_ERROR_CODE_INVALID_TOKEN |
| int | LOGIN_ERROR_CODE_LOGIN_FAILED |
| int | LOGIN_ERROR_CODE_INVALID_USER_ID |
| int | LOGIN_ERROR_CODE_SERVER_ERROR |
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.LoginErrorCode.LOGIN_ERROR_CODE_SUCCESS = 0;
调用 login 方法登录成功。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.LoginErrorCode.LOGIN_ERROR_CODE_INVALID_TOKEN = -1000;
调用 login 方法时使用的 Token 无效或过期失效。需要用户重新获取 Token。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.LoginErrorCode.LOGIN_ERROR_CODE_LOGIN_FAILED = -1001;
登录错误。
调用 login 方法时发生未知错误导致登录失败,需要重新登录。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.LoginErrorCode.LOGIN_ERROR_CODE_INVALID_USER_ID = -1002;
调用 login 方法时传入的用户 ID 有问题。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.LoginErrorCode.LOGIN_ERROR_CODE_SERVER_ERROR = -1003;
调用 login 登录时服务器错误。
public class com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult
发送消息返回错误码
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_SUCCESS = 0;
向房间内单个用户发送消息成功
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_TIMEOUT = 1;
发送超时,没有发送
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_BROKEN = 2;
通道断开,没有发送
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_NO_RECEIVER = 3;
找不到接收方
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_NO_RELAY_PATH = 4;
获取级联路径失败
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_NOT_JOIN = 100;
消息发送方没有加入房间
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_INIT = 101;
连接未完成初始化。
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_NO_CONNECTION = 102;
没有可用的数据传输通道连接
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_EXCEED_MAX_LENGTH = 103;
消息超过最大长度,当前为64KB
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_EMPTY_USER = 104;
接收消息的单个用户 id 为空
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_NOT_LOGIN = 105;
房间外或业务服务器消息发送方没有登录
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_SERVER_PARAMS_NOT_SET = 106;
发送消息给业务方服务器之前没有设置参数
public static final int com.ss.bytertc.engine.handler.IRTCEngineEventHandler.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_UNKNOWN = 1000;
未知错误