ByteRTCUserOfflineReason
typedef NS_ENUM(NSUInteger, ByteRTCUserOfflineReason)
objectivec

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

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

房间内远端流移除原因。

枚举值
类型值说明
ByteRTCStreamRemoveReasonUnpublish0远端用户停止发布流。
ByteRTCStreamRemoveReasonPublishFailed1远端用户发布流失败。
ByteRTCStreamRemoveReasonKeepLiveFailed2保活失败。
ByteRTCStreamRemoveReasonClientDisconnected3远端用户断网。
ByteRTCStreamRemoveReasonRepublish4远端用户重新发布流。
ByteRTCStreamRemoveReasonOther5其他原因。
ByteRTCSysStats
@interface ByteRTCSysStats : NSObject
objectivec

App 使用的 cpu 和 memory 信息

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

成员变量
类型名称
unsignedcpu_cores
doublecpu_app_usage
doublecpu_total_usage
doublememory_usage
unsignedfull_memory
unsignedtotal_memory_usage
unsignedfree_memory
doublememory_ratio
doubletotal_memory_ratio
变量说明

cpu_cores
@property(assign, nonatomic) unsigned int cpu_cores;
objectivec

当前系统 cpu 核数

cpu_app_usage
@property(assign, nonatomic) double cpu_app_usage;
objectivec

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

cpu_total_usage
@property(assign, nonatomic) double cpu_total_usage;
objectivec

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

memory_usage
@property(assign, nonatomic) double memory_usage;
objectivec

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

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

全量内存(单位MB)

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

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

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

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

memory_ratio
@property(assign, nonatomic) double memory_ratio;
objectivec

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

total_memory_ratio
@property(assign, nonatomic) double total_memory_ratio;
objectivec

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

ByteRTCUserOnlineStatus
typedef NS_ENUM(NSInteger, ByteRTCUserOnlineStatus)
objectivec

用户在线状态

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

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

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

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

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