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

类型详情

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

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

ByteRTCUserOfflineReason
typedef NS_ENUM(NSUInteger, ByteRTCUserOfflineReason)

远端用户离开房间的原因。

枚举值

类型说明
ByteRTCUserOfflineReasonQuit0远端用户调用 leaveRoom 方法主动退出房间。
ByteRTCUserOfflineReasonDropped1远端用户因网络等原因掉线。
ByteRTCUserOfflineReasonSwitchToInvisible2远端用户切换至隐身状态。
ByteRTCUserOfflineReasonKickedByAdmin3远端用户被踢出出房间。
因调用踢出用户的 OpenAPI,远端用户被踢出房间。
ByteRTCConnectionState
typedef NS_ENUM(NSInteger, ByteRTCConnectionState)

SDK 与信令服务器连接状态。

枚举值

类型说明
ByteRTCConnectionStateDisconnected1连接断开超过 12s,此时 SDK 会尝试自动重连。
ByteRTCConnectionStateConnecting2首次请求建立连接,正在连接中。
ByteRTCConnectionStateConnected3首次连接成功。
ByteRTCConnectionStateReconnecting4涵盖了以下情况:

+ 首次连接时,10秒连接不成功;

+ 连接成功后,断连 10 秒。自动重连中。
ByteRTCConnectionStateReconnected5连接断开后,重连成功。
ByteRTCConnectionStateLost6处于 ByteRTCConnectionStateDisconnected 状态超过 10 秒,且期间重连未成功。SDK 仍将继续尝试重连。
ByteRTCConnectionStateFailed7连接失败,服务端状态异常。SDK 不会自动重连,请重新进房,或联系技术支持。
ByteRTCNetworkType
typedef NS_ENUM(NSInteger, ByteRTCNetworkType)

SDK 网络连接类型。

枚举值

类型说明
ByteRTCNetworkTypeUnknown-1网络连接类型未知。
ByteRTCNetworkTypeDisconnected0网络连接已断开。
ByteRTCNetworkTypeLAN1网络连接类型为 LAN 。
ByteRTCNetworkTypeWIFI2网络连接类型为 Wi-Fi(包含热点)。
ByteRTCNetworkTypeMobile2G3网络连接类型为 2G 移动网络。
ByteRTCNetworkTypeMobile3G4网络连接类型为 3G 移动网络。
ByteRTCNetworkTypeMobile4G5网络连接类型为 4G 移动网络。
ByteRTCNetworkTypeMobile5G6网络连接类型为 5G 移动网络。
ByteRTCNetworkQuality
typedef NS_ENUM(NSUInteger, ByteRTCNetworkQuality)

媒体流网络质量。

枚举值

类型说明
ByteRTCNetworkQualityUnknown0网络质量未知。
ByteRTCNetworkQualityExcellent1网络质量极好。
ByteRTCNetworkQualityGood2主观感觉和 kNetworkQualityExcellent 差不多,但码率可能略低。
ByteRTCNetworkQualityPoor3主观感受有瑕疵但不影响沟通。
ByteRTCNetworkQualityBad4勉强能沟通但不顺畅。
ByteRTCNetworkQualityVeryBad5网络质量非常差,基本不能沟通。
ByteRTCNetworkQualityDown6网络连接断开,无法通话。网络可能由于 12s 内无应答、开启飞行模式、拔掉网线等原因断开。
更多网络状态信息参见 连接状态提示
ByteRTCLogLevel
typedef NS_ENUM(NSUInteger, ByteRTCLogLevel)

日志级别。

枚举值

类型说明
ByteRTCLogLevelTrace0打印 trace 级别及以上级别信息。
ByteRTCLogLevelDebug1打印 debug 级别及以上级别信息。
ByteRTCLogLevelInfo2打印 info 级别及以上级别信息。
ByteRTCLogLevelWarning3打印 warning 级别及以上级别信息。
ByteRTCLogLevelError4打印 error 级别信息。
ByteRTCMessageConfig
typedef NS_ENUM(NSInteger, ByteRTCMessageConfig)

发送消息的可靠有序类型

枚举值

类型说明
ByteRTCMessageConfigReliableOrdered0低延时可靠有序消息
ByteRTCMessageConfigUnreliableOrdered1超低延时有序消息
ByteRTCMessageConfigUnreliableUnordered2超低延时无序消息
ByteRTCUserOnlineStatus
typedef NS_ENUM(NSInteger, ByteRTCUserOnlineStatus)

用户在线状态

枚举值

类型说明
ByteRTCUserOnlineStatusOffline0对端用户离线
对端用户已经调用 logout,或者没有调用 login:uid: 进行登录
ByteRTCUserOnlineStatusOnline1对端用户在线
对端用户调用 login:uid: 登录,并且连接状态正常
ByteRTCUserOnlineStatusUnreachable2无法获取对端用户在线状态
发生级联错误、对端用户在线状态异常时返回
ByteRTCLocalLogLevel
typedef NS_ENUM(NSUInteger, ByteRTCLocalLogLevel)

本地日志输出等级。

枚举值

类型说明
ByteRTCLocalLogLevelInfo0信息级别。
ByteRTCLocalLogLevelWarning1(默认值)警告级别。
ByteRTCLocalLogLevelError2错误级别。
ByteRTCLocalLogLevelNone3关闭日志。
ByteRTCSysStats
@interface ByteRTCSysStats : NSObject

App 使用的 cpu 和 memory 信息

信息由 SDK 周期性(2s)地通过 reportSysStats 回调事件通知给用户。

成员变量

类型名称
unsignedcpu_cores
doublecpu_app_usage
doublememory_usage
unsignedfull_memory
unsignedtotal_memory_usage
unsignedfree_memory
doublememory_ratio
doubletotal_memory_ratio

变量说明

cpu_cores

@property(assign, nonatomic) unsigned int cpu_cores;

当前系统 cpu 核数

cpu_app_usage

@property(assign, nonatomic) double cpu_app_usage;

当前应用的 CPU 使用率,取值范围为 [0, 1]。

memory_usage

@property(assign, nonatomic) double memory_usage;

当前App的内存使用(单位 MB)

full_memory

@property(assign, nonatomic) unsigned long long full_memory;

全量内存(单位MB)

total_memory_usage

@property(assign, nonatomic) unsigned long long total_memory_usage;

系统已使用内存(单位MB)

free_memory

@property(assign, nonatomic) unsigned long long free_memory;

空闲可分配内存(单位MB)

memory_ratio

@property(assign, nonatomic) double memory_ratio;

当前应用的内存使用率(单位 %)

total_memory_ratio

@property(assign, nonatomic) double total_memory_ratio;

系统内存使用率(单位 %)

ByteRTCLogConfig
@interface ByteRTCLogConfig : NSObject

本地日志参数。

成员变量

类型名称
NSString*logPath
ByteRTCLocalLogLevellogLevel
intlogFileSize

变量说明

logPath

@property(copy, nonatomic) NSString *_Nonnull logPath;

日志存储路径。

logLevel

@property(assign, nonatomic) ByteRTCLocalLogLevel logLevel;

日志等级,参看 ByteRTCLocalLogLevel,默认为警告级别。

logFileSize

@property(assign, nonatomic) int logFileSize;

日志可使用的最大缓存空间,单位为 MB。取值范围为 1~100 MB,默认值为 10 MB。

ByteRTCCloudProxyInfo
@interface ByteRTCCloudProxyInfo: NSObject

云代理信息

成员变量

类型名称
NSString*cloudProxyIp
intcloudProxyPort

变量说明

cloudProxyIp

@property(strong, nonatomic) NSString* _Nonnull cloudProxyIp;

云代理服务器 IP

cloudProxyPort

@property(assign, nonatomic) int cloudProxyPort;

云代理服务器端口

ByteRTCLocalProxyType
typedef NS_ENUM(NSUInteger, ByteRTCLocalProxyType)

本地代理的类型。

枚举值

类型说明
ByteRTCLocalProxyTypeSocks51Socks5 代理。选用此代理服务器,需满足 Socks5 协议标准文档的要求。
ByteRTCLocalProxyTypeHttpTunnel2Http 隧道代理。
ByteRTCLocalProxyInfo
@interface ByteRTCLocalProxyInfo : NSObject

本地代理配置详细信息。

成员变量

类型名称
ByteRTCLocalProxyTypelocalProxyType
NSString*localProxyIp
intlocalProxyPort
NSString*localProxyUsername
NSString*localProxyPassword

变量说明

localProxyType

@property(assign, nonatomic) ByteRTCLocalProxyType localProxyType;

本地代理的类型,参看 ByteRTCLocalProxyType

localProxyIp

@property(copy, nonatomic) NSString * _Nullable localProxyIp;

本地代理服务器 IP。

localProxyPort

@property(assign, nonatomic) int localProxyPort;

本地代理服务器端口。

localProxyUsername

@property(copy, nonatomic) NSString * _Nullable localProxyUsername;

本地代理用户名。

localProxyPassword

@property(copy, nonatomic) NSString * _Nullable localProxyPassword;

本地代理密码。

ByteRTCLocalProxyState
typedef NS_ENUM(NSUInteger, ByteRTCLocalProxyState)

本地代理连接状态。

枚举值

类型说明
ByteRTCLocalProxyStateInited0TCP 代理服务器连接成功。
ByteRTCLocalProxyStateConnected1本地代理连接成功。
ByteRTCLocalProxyStateError2本地代理连接出现错误。
ByteRTCLocalProxyError
typedef NS_ENUM(NSUInteger, ByteRTCLocalProxyError)

本地代理错误。

枚举值

类型说明
ByteRTCLocalProxyErrorOK0本地代理服务器无错误。
ByteRTCLocalProxyErrorSocks5VersionError1代理服务器回复的版本号不符合 Socks5 协议标准文档的规定,导致 Socks5 代理连接失败。请检查代理服务器是否存在异常。
ByteRTCLocalProxyErrorSocks5FormatError2代理服务器回复的格式错误不符合 Socks5 协议标准文档的规定,导致 Socks5 代理连接失败。请检查代理服务器是否存在异常。
ByteRTCLocalProxyErrorSocks5InvalidValue3代理服务器回复的字段值不符合 Socks5 协议标准文档的规定,导致 Socks5 代理连接失败。请检查代理服务器是否存在异常。
ByteRTCLocalProxyErrorSocks5UserPassNotGiven4未提供代理服务器的用户名及密码,导致 Socks5 代理连接失败。请重新调用 setLocalProxy,在设置本地代理时填入用户名和密码。
ByteRTCLocalProxyErrorSocks5TcpClosed5TCP 关闭,导致 Socks5 代理连接失败。请检查网络或者代理服务器是否存在异常。
ByteRTCLocalProxyErrorHttpTunnelFailed6Http 隧道代理错误。请检查 Http 隧道代理服务器或者网络是否存在异常。
ByteRTCReturnStatus
typedef NS_ENUM(NSInteger, ByteRTCReturnStatus)

方法调用结果。

枚举值

类型说明
ByteRTCReturnStatusSuccess0成功。
ByteRTCReturnStatusFailure-1失败。
ByteRTCReturnStatusParameterErr-2参数错误。
ByteRTCReturnStatusWrongState-3接口状态错误。
ByteRTCReturnStatusHasInRoom-4失败,用户已在房间内。
ByteRTCReturnStatusHasInLogin-5失败,用户已登录。
ByteRTCReturnStatusHasInEchoTest-6失败,用户已经在进行通话回路测试中。
ByteRTCReturnStatusNeitherVideoNorAudio-7失败,音视频均未采集。
ByteRTCReturnStatusRoomIdInUse-8失败,该 roomId 已被使用。
ByteRTCReturnStatusScreenNotSupport-9失败,屏幕流不支持。
ByteRTCReturnStatusNotSupport-10失败,不支持该操作。
ByteRTCReturnStatusResourceOverflow-11失败,资源已占用。
ByteRTCReturnStatusAudioNoFrame-101失败,没有音频帧。
ByteRTCReturnStatusAudioNotImplemented-102失败,未实现。
ByteRTCReturnStatusAudioNoPermission-103失败,采集设备无麦克风权限,尝试初始化设备失败。
ByteRTCReturnStatusAudioDeviceNotExists-104失败,设备不存在。当前没有设备或设备被移除时返回该值。
ByteRTCReturnStatusAudioDeviceFormatNotSupport-105失败,设备音频格式不支持。
ByteRTCReturnStatusAudioDeviceNoDevice-106失败,系统无可用设备。
ByteRTCReturnStatusAudioDeviceCannotUse-107失败,当前设备不可用,需更换设备。
ByteRTCReturnStatusAudioDeviceInitFailed-108系统错误,设备初始化失败。
ByteRTCReturnStatusAudioDeviceStartFailed-109系统错误,设备开启失败。
ByteRTCReturnStatusNativeInValid-201失败。底层未初始化,engine 无效。