最近更新时间:2023.11.03 16:17:51
首次发布时间:2022.09.14 20:26:33
public class com.ss.bytertc.engine.type.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.type.LoginErrorCode.LOGIN_ERROR_CODE_SUCCESS = 0;
调用 login
方法登录成功。
public static final int com.ss.bytertc.engine.type.LoginErrorCode.LOGIN_ERROR_CODE_INVALID_TOKEN = -1000;
调用 login
方法时使用的 Token 无效或过期失效。需要用户重新获取 Token。
public static final int com.ss.bytertc.engine.type.LoginErrorCode.LOGIN_ERROR_CODE_LOGIN_FAILED = -1001;
登录错误。
调用 login
方法时发生未知错误导致登录失败,需要重新登录。
public static final int com.ss.bytertc.engine.type.LoginErrorCode.LOGIN_ERROR_CODE_INVALID_USER_ID = -1002;
调用 login
方法时传入的用户 ID 有问题。
public static final int com.ss.bytertc.engine.type.LoginErrorCode.LOGIN_ERROR_CODE_SERVER_ERROR = -1003;
调用 login
登录时服务器错误。
public class com.ss.bytertc.engine.type.UserMessageSendResult
发送消息结果,成功或失败,及失败原因
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_SUCCESS = 0;
发送消息成功
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_TIMEOUT = 1;
发送超时,没有发送
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_BROKEN = 2;
通道断开,没有发送
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_NO_RECEIVER = 3;
找不到接收方
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_NO_RELAY_PATH = 4;
远端用户没有登录或进房
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_EXCEED_QPS = 5;
超过 QPS 限制
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_NOT_JOIN = 100;
消息发送方没有加入房间
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_INIT = 101;
连接未完成初始化。
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_NO_CONNECTION = 102;
没有可用的数据传输通道连接
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_EXCEED_MAX_LENGTH = 103;
消息超过最大长度,当前为 64KB。
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_EMPTY_USER = 104;
接收消息的单个用户 id 为空
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_NOT_LOGIN = 105;
房间外或应用服务器消息发送方没有登录
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_SERVER_PARAMS_NOT_SET = 106;
发送消息给业务方服务器之前没有设置参数
public static final int com.ss.bytertc.engine.type.UserMessageSendResult.USER_MESSAGE_SEND_RESULT_UNKNOWN = 1000;
未知错误
public class com.ss.bytertc.engine.type.WarningCode
回调警告码。
警告码说明 SDK 内部遇到问题正在尝试恢复。警告码仅作通知。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_GET_ROOM_FAILED = -2000;
获取房间信息失败警告
Deprecated since 3.45 and will be deleted in 3.51.注意:
SDK 获取房间信息失败(包含超时,返回非 200 的错误码),每隔两秒重试一次。 连续失败 5 次后,报该 warning,并继续重试。
建议提示用户:进入房间失败,请稍后再试
SDK 获取房间信息失败(包含超时,返回非 200 的错误码),每隔两秒重试一次。 连续失败 5 次后,报该 warning,并继续重试。
建议提示用户:进入房间失败,请稍后再试
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_JOIN_ROOM_FAILED = -2001;
进房失败。
初次进房或者由于网络状况不佳断网重连时,由于服务器错误导致进房失败。SDK 会自动重试进房。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_PUBLISH_STREAM_FAILED = -2002;
发布音视频流失败。
当你在所在房间中发布音视频流时,由于服务器错误导致发布失败。SDK 会自动重试发布。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_SUBSCRIBE_STREAM_FAILED404 = -2003;
订阅音视频流失败。
当前房间中找不到订阅的音视频流导致订阅失败。SDK 会自动重试订阅,若仍订阅失败则建议你退出重试。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_SUBSCRIBE_STREAM_FAILED5XX = -2004;
订阅音视频流失败。
当你订阅所在房间中的音视频流时,由于服务器错误导致订阅失败。SDK 会自动重试订阅。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_PUBLISH_STREAM_FORBIDEN = -2009;
当调用 setUserVisibility
将自身可见性设置为 false 后,再尝试发布流会触发此警告。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_SUBSCRIBE_STREAM_FORBIDEN = -2010;
自动订阅模式未关闭时,尝试开启手动订阅模式会触发此警告。
你需在进房前关闭自动订阅模式,再调用 subscribeUserStream 方法手动订阅音视频流。
Deprecated since 3.45 and will be deleted in 3.51.
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_SEND_CUSTOM_MESSAGE = -2011;
发送自定义广播消息失败, 当前你未在房间中。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_RECEIVE_USER_NOTIFY_STOP = -2013;
当房间内人数超过 500 人时,停止向房间内已有用户发送 onUserJoined
和 onUserLeave
回调,并通过广播提示房间内所有用户。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_USER_IN_PUBLISH = -2014;
用户已经在其他房间发布过流,或者用户正在发布公共流。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_ROOM_ID_ALREADY_EXIST = -2015;
已存在同样 roomId 的房间。
Deprecated since 3.45 and will be deleted in 3.51.
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_OLD_ROOM_BEEN_REPLACED = -2016;
已存在相同 roomId 的房间,新创建的房间实例已替换旧房间实例。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_IN_ECHO_TEST_MODE = -2017;
当前正在进行回路测试,该接口调用无效
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_NO_CAMERA_PERMISSION = -5001;
摄像头权限异常,当前应用没有获取摄像头权限。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_NO_MICROPHONE_PERMISSION = -5002;
麦克风权限异常,当前应用没有获取麦克风权限。
Deprecated since 3.33 and will be deleted in 3.51, use MediaDeviceWarning instead.
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_RECODING_DEVICE_START_FAILED = -5003;
音频采集设备启动失败。
启动音频采集设备失败,当前设备可能被其他应用占用。
Deprecated since 3.33 and will be deleted in 3.51, use MediaDeviceWarning instead.
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_PLAYOUT_DEVICE_START_FAILED = -5004;
音频播放设备启动失败警告。
可能由于系统资源不足,或参数错误。
Deprecated since 3.33 and will be deleted in 3.51, use MediaDeviceWarning instead.
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_NO_RECORDING_DEVICE = -5005;
无可用音频采集设备。
启动音频采集设备失败,请插入可用的音频采集设备。
Deprecated since 3.33 and will be deleted in 3.51, use MediaDeviceWarning instead.
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_NO_PLAYOUT_DEVICE = -5006;
无可用音频播放设备。
启动音频播放设备失败,请插入可用的音频播放设备。
Deprecated since 3.33 and will be deleted in 3.51, use MediaDeviceWarning instead.
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_RECORDING_SILENCE = -5007;
当前音频设备没有采集到有效的声音数据,请检查更换音频采集设备。
Deprecated since 3.33 and will be deleted in 3.51, use MediaDeviceWarning instead.
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_MEDIA_DEVICE_OPERATION_DENIED = -5008;
媒体设备误操作警告。
使用自定义采集时,不可调用内部采集开关,调用时将触发此警告。
Deprecated since 3.33 and will be deleted in 3.51, use MediaDeviceWarning instead.
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_SET_SCREEN_AUDIO_SOURCE_TYPE_FAILED = -5009;
不支持在 publishScreen 之后,调用 setScreenAudioSourceType 设置屏幕音频采集类型
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_SET_SCREEN_STREAM_INDEX_FAILED = -5010;
不支持在 publishScreen 之后,调用 setScreenAudioStreamIndex 设置屏幕音频共享发布类型
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_SET_SCREEN_STREAM_INVALID_VOICE_PITCH = -5011;
设置语音音高不合法
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_INVALID_CALL_FOR_EXT_AUDIO = -5013;
外部音频源新旧接口混用
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_INVALID_SAMI_APPKEY_OR_TOKEN = -7002;
音频技术 SDK 鉴权失效。联系技术支持人员。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_INVALID_RESOURCE_PATH = -7003;
音频技术 资源加载失败。传入正确的 DAT 路径,或联系技术支持人员。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_LOAD_SAMI_LIBRARY_FAILED= -7004;
音频技术 库加载失败。使用正确的库,或联系技术支持人员。
public static final int com.ss.bytertc.engine.type.WarningCode.WARNING_CODE_INVALID_SAMI_EFFECT_TYPE = -7005;
音频技术 不支持此音效。联系技术支持人员。
public class com.ss.bytertc.rts.engine.type.ErrorCode
回调错误码。
SDK 内部遇到不可恢复的错误时,会通过 onError
回调通知用户。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_INVALID_TOKEN = -1000;
Token 无效。
调用 joinRoom 进房时使用的 Token 参数有误或过期失效。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_JOIN_ROOM = -1001;
加入房间错误。
进房时发生未知错误导致加入房间失败。需要用户重新加入房间。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_NO_PUBLISH_PERMISSION = -1002;
没有发布音视频流权限。
用户在所在房间中发布音视频流失败,失败原因为用户没有发布流的权限。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_NO_SUBSCRIBE_PERMISSION = -1003;
没有订阅音视频流权限。
用户订阅所在房间中的音视频流失败,失败原因为用户没有订阅流的权限。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_DUPLICATE_LOGIN = -1004;
相同用户 ID 的用户加入本房间,当前用户被踢出房间
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_APP_ID_NULL = -1005;
App ID 参数异常。
创建引擎时传入的 App ID 参数为空。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_KICKED_OUT = -1006;
服务端调用 OpenAPI 将当前用户踢出房间
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_ROOM_ID_ILLEGAL = -1007;
当调用 createRoom
,如果 roomId 非法,会返回 null,并抛出该错误
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_TOKEN_EXPIRED = -1009;
Token 过期。加入房间后 Token 过期时,返回此错误码。需使用新的 Token 重新加入房间。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_UPDATE_TOKEN_WITH_INVALID_TOKEN = -1010;
调用 updateToken
传入的 Token 无效
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_ROOM_DISMISS = -1011;
服务端调用 OpenAPI 解散房间,所有用户被移出房间。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_JOIN_ROOM_WITHOUT_LICENSE_AUTHENTICATE_SDK = -1012;
加入房间错误。
调用 joinRoom
方法时, LICENSE 计费账号未使用 LICENSE_AUTHENTICATE SDK,加入房间错误。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_ROOM_ALREADY_EXIST = -1013;
通话回路检测已经存在同样 roomId 的房间了
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_OVER_SUBSCRIBE_LIMIT = -1070;
订阅音视频流失败,订阅音视频流总数超过上限。
游戏场景下为了保证音视频通话的性能和质量,服务器会限制用户订阅的音视频流的总数。当用户订阅的音视频流总数已达上限时,继续订阅更多流时会失败,同时用户会收到此错误通知。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_OVER_STREAM_PUBLISH_LIMIT = -1080;
发布流失败,发布流总数超过上限。
RTC 系统会限制单个房间内发布的总流数,总流数包括视频流、音频流和屏幕流。如果房间内发布流数已达上限时,本地用户再向房间中发布流时会失败,同时会收到此错误通知。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_OVER_SCREEN_PUBLISH_LIMIT = -1081;
发布屏幕流失败,发布流总数超过上限。
RTC 系统会限制单个房间内发布的总流数,总流数包括视频流、音频流和屏幕流。如果房间内发布流数已达上限时,本地用户再向房间中发布流时会失败,同时会收到此错误通知。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_OVER_VIDEO_PUBLISH_LIMIT = -1082;
发布视频流总数超过上限。
RTC 系统会限制单个房间内发布的视频流数。如果房间内发布视频流数已达上限时,本地用户再向房间中发布视频流时会失败,同时会收到此错误通知。
Deprecated since 3.52, use kErrorCodeOverStreamPublishLimit(-1080)instead
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_INVALID_AUDIO_SYNC_USERID_REPEATED = -1083;
音视频同步失败。
当前音频源已与其他视频源关联同步关系。
单个音频源不支持与多个视频源同时同步。
public static final int com.ss.bytertc.rts.engine.type.ErrorCode.ERROR_CODE_ABNORMAL_SERVER_STATUS = -1084;
服务端异常状态导致退出房间。
SDK与信令服务器断开,并不再自动重连,可联系技术支持。
public class com.ss.bytertc.rts.engine.type.RoomMessageSendResult
房间内群发消息结果
public static final int com.ss.bytertc.rts.engine.type.RoomMessageSendResult.ROOM_MESSAGE_SEND_RESULT_SUCCESS = 200;
发送成功
public static final int com.ss.bytertc.rts.engine.type.RoomMessageSendResult.ROOM_MESSAGE_SEND_RESULT_EXCEED_QPS = 5;
超过 QPS 限制
public static final int com.ss.bytertc.rts.engine.type.RoomMessageSendResult.ROOM_MESSAGE_SEND_RESULT_NOT_JOIN = 100;
发送失败。消息发送方没有加入房间。
public static final int com.ss.bytertc.rts.engine.type.RoomMessageSendResult.ROOM_MESSAGE_SEND_RESULT_INIT = 101;
发送失败。连接未完成初始化。
public static final int com.ss.bytertc.rts.engine.type.RoomMessageSendResult.ROOM_MESSAGE_SEND_RESULT_NO_CONNECTION = 102;
发送失败。没有可用的数据传输通道连接
public static final int com.ss.bytertc.rts.engine.type.RoomMessageSendResult.ROOM_MESSAGE_SEND_RESULT_EXCEED_MAX_LENGTH = 103;
发送失败。消息超过最大长度 64KB。
public static final int com.ss.bytertc.rts.engine.type.RoomMessageSendResult.ROOM_MESSAGE_SEND_RESULT_UNKNOWN = 1000;
发送失败。未知错误