CallState

data class CallState(var activeCall: StateFlow<CallInfo>, var recentCalls: StateFlow<LinkedHashSet<CallInfo>>, var cursor: StateFlow<String>, var selfInfo: StateFlow<CallParticipantInfo>, var allParticipants: StateFlow<LinkedHashSet<CallParticipantInfo>>, var speakerVolumes: StateFlow<MutableMap<String, Int>>, var networkQualities: StateFlow<MutableMap<String, NetworkQuality>>)

通话状态数据,管理当前通话的实时数据状态。

概览

当前通话会话状态的综合快照。此结构包含有关活跃通话、最近通话记录、参与者列表等所有相关信息。

状态属性概览

属性类型描述
activeCallStateFlow<CallInfo>当前活跃通话信息
recentCallsStateFlow<LinkedHashSet<CallInfo>>最近通话记录列表
cursorStateFlow<String>分页游标
selfInfoStateFlow<CallParticipantInfo>当前用户自身信息
allParticipantsStateFlow<LinkedHashSet<CallParticipantInfo>>当前通话所有参与者列表
speakerVolumesStateFlow<MutableMap<String, Int>>参与者音量信息
networkQualitiesStateFlow<MutableMap<String, NetworkQuality>>参与者网络质量信息

Tip: 通话状态会自动更新,订阅 callState 以接收实时更新。

Constructors

Link copied to clipboard
constructor(activeCall: StateFlow<CallInfo>, recentCalls: StateFlow<LinkedHashSet<CallInfo>>, cursor: StateFlow<String>, selfInfo: StateFlow<CallParticipantInfo>, allParticipants: StateFlow<LinkedHashSet<CallParticipantInfo>>, speakerVolumes: StateFlow<MutableMap<String, Int>>, networkQualities: StateFlow<MutableMap<String, NetworkQuality>>)

Properties

Link copied to clipboard
var activeCall: StateFlow<CallInfo>

当前活跃通话信息

Link copied to clipboard

当前通话所有参与者列表

Link copied to clipboard
var cursor: StateFlow<String>

分页游标,用于查询更多通话记录

Link copied to clipboard

参与者网络质量信息,key 为用户 ID,value 为网络质量

Link copied to clipboard

最近通话记录列表

Link copied to clipboard

当前用户自身信息

Link copied to clipboard

参与者音量信息,key 为用户 ID,value 为音量值