RoomParticipantStore 提供了一套全面的 API 来管理房间参与者相关操作。state 发布者传递。订阅它以接收有关参与者列表的实时更新。属性名 | 类型 | 描述 |
participantList | 参与者列表。 | |
participantListCursor | String | 参与者列表游标。 |
audienceList | [RoomUser] | 观众列表(适用于网络研讨会模式)。 |
audienceListCursor | String | 观众列表游标。 |
adminList | [RoomUser] | 管理员列表。 |
messageDisabledUserList | [RoomUser] | 被禁言用户列表。 |
participantListWithVideo | 有视频的参与者列表。 | |
participantWithScreen | 正在屏幕共享的参与者。 | |
pendingDeviceApplications | 待处理的设备申请列表。 | |
pendingDeviceInvitations | 待处理的设备邀请列表。 | |
speakingUsers | [String : Int] | 正在说话的用户及其音量。 |
networkQualities | [String : NetworkInfo] | 用户网络质量信息。 |
pendingParticipantList | 待加入的参与者列表。 | |
localParticipant | 本地参与者信息。 |
函数名 | 描述 |
创建对象实例。 | |
参与者事件回调。 | |
参与者事件回调。 | |
获取参与者列表。 | |
获取观众列表(适用于网络研讨会模式)。 | |
根据关键字搜索用户。 | |
将观众提升为嘉宾(适用于网络研讨会模式)。 | |
将嘉宾降级为观众(适用于网络研讨会模式)。 | |
转让房主。 | |
设置管理员。 | |
撤销管理员。 | |
踢出用户。 | |
更新参与者名片。 | |
更新参与者元数据。 | |
静音麦克风。 | |
取消静音麦克风。 | |
关闭参与者设备。 | |
禁言用户。 | |
禁用所有设备。 | |
全员禁言。 | |
请求开启设备。 | |
取消开启设备请求。 | |
批准开启设备请求。 | |
拒绝开启设备请求。 | |
邀请开启设备。 | |
取消开启设备邀请。 | |
接受开启设备邀请。 | |
拒绝开启设备邀请。 |
static create(roomID: string): RoomParticipantStore {return StoreRegistry.getStore(StoreType.RoomParticipantStore, roomID) as RoomParticipantStore}
参数名 | 类型 | 描述 |
roomID | String | 房间 ID。 |
abstract addRoomParticipantListener(listener: RoomParticipantListener): void
参数名 | 类型 | 描述 |
listener | 监听器。 |
abstract removeRoomParticipantListener(listener: RoomParticipantListener): void
参数名 | 类型 | 描述 |
listener | 监听器。 |
abstract getParticipantList(cursor?: string): Promise<ListResult<RoomParticipant>>
参数名 | 类型 | 描述 |
cursor | String? | 分页游标。 |
abstract getAudienceList(cursor?: string): Promise<ListResult<RoomUser>>
参数名 | 类型 | 描述 |
cursor | String? | 分页游标。 |
abstract searchUsers(keyword: string): Promise<ListResult<RoomUser>>
参数名 | 类型 | 描述 |
keyword | String | 搜索关键字。 |
abstract promoteAudienceToParticipant(userID: string): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
abstract demoteParticipantToAudience(userID: string): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
abstract transferOwner(userID: string): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
abstract setAdmin(userID: string): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
abstract revokeAdmin(userID: string): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
abstract kickUser(userID: string): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
abstract updateParticipantNameCard(userID: string, nameCard: string): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
nameCard | String | 名片。 |
abstract updateParticipantMetaData(userID: string, metaData: Map<string, string>): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
metaData | [String: String] | 元数据。 |
abstract muteMicrophone(): void
abstract unmuteMicrophone(): Promise<void>
abstract closeParticipantDevice(userID: string, device: DeviceType): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
device | DeviceType | 设备类型。 |
abstract disableUserMessage(userID: string, disable: boolean): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
disable | Bool | 是否禁言。 |
abstract disableAllDevices(device: DeviceType, disable: boolean): Promise<void>
参数名 | 类型 | 描述 |
device | DeviceType | 设备类型。 |
disable | Bool | 是否禁用。 |
abstract disableAllMessages(disable: boolean): Promise<void>
参数名 | 类型 | 描述 |
disable | Bool | 是否禁言。 |
abstract requestToOpenDevice(device: DeviceType, timeout?: number): Promise<void>
参数名 | 类型 | 描述 |
device | DeviceType | 设备类型。 |
timeout | Int | 超时时间(单位:秒)。 |
abstract cancelOpenDeviceRequest(device: DeviceType): Promise<void>
参数名 | 类型 | 描述 |
device | DeviceType | 设备类型。 |
abstract approveOpenDeviceRequest(device: DeviceType, userID: string): Promise<void>
参数名 | 类型 | 描述 |
device | DeviceType | 设备类型。 |
userID | String | 用户 ID。 |
abstract rejectOpenDeviceRequest(device: DeviceType, userID: string): Promise<void>
参数名 | 类型 | 描述 |
device | DeviceType | 设备类型。 |
userID | String | 用户 ID。 |
abstract inviteToOpenDevice(userID: string, device: DeviceType, timeout?: number): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
device | DeviceType | 设备类型。 |
timeout | Int | 超时时间(单位:秒)。 |
abstract cancelOpenDeviceInvitation(userID: string, device: DeviceType): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
device | DeviceType | 设备类型。 |
abstract acceptOpenDeviceInvitation(userID: string, device: DeviceType): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
device | DeviceType | 设备类型。 |
abstract declineOpenDeviceInvitation(userID: string, device: DeviceType): Promise<void>
参数名 | 类型 | 描述 |
userID | String | 用户 ID。 |
device | DeviceType | 设备类型。 |
枚举值 | 值 | 说明 |
owner | 0 | 房主。 |
admin | 1 | 管理员。 |
generalUser | 2 | 普通用户。 |
枚举值 | 说明 |
scheduled | 已预约。 |
inCalling | 呼叫中。 |
callTimeout | 呼叫超时。 |
callRejected | 呼叫被拒绝。 |
inRoom | 在房间中。 |
枚举值 | 说明 |
kickedByAdmin | 被管理员踢出。 |
replacedByAnotherDevice | 被其他设备顶替。 |
kickedByServer | 被服务器踢出。 |
connectionTimeout | 连接超时。 |
invalidStatusOnReconnect | 重连时状态无效。 |
roomLimitExceeded | 房间人数超限。 |
方法名 | 说明 |
onParticipantJoined | 当参与者加入房间时触发此回调。 |
onParticipantLeft | 当参与者离开房间时触发此回调。 |
onAudiencePromotedToParticipant | 当观众被提升为嘉宾时触发此回调。 |
onParticipantDemotedToAudience | 当嘉宾被降级为观众时触发此回调。 |
onOwnerChanged | 当房主变更时触发此回调。 |
onAdminSet | 当设置管理员时触发此回调。 |
onAdminRevoked | 当撤销管理员时触发此回调。 |
onKickedFromRoom | 当被踢出房间时触发此回调。 |
onParticipantDeviceClosed | 当参与者设备被关闭时触发此回调。 |
onUserMessageDisabled | 当用户被禁言时触发此回调。 |
onAllDevicesDisabled | 当所有设备被禁用时触发此回调。 |
onAllMessagesDisabled | 当全员禁言时触发此回调。 |
onDeviceRequestReceived | 当收到设备请求时触发此回调。 |
onDeviceRequestCancelled | 当设备请求被取消时触发此回调。 |
onDeviceRequestTimeout | 当设备请求超时时触发此回调。 |
onDeviceRequestApproved | 当设备请求被批准时触发此回调。 |
onDeviceRequestRejected | 当设备请求被拒绝时触发此回调。 |
onDeviceRequestProcessed | 当设备请求被处理时触发此回调。 |
onDeviceInvitationReceived | 当收到设备邀请时触发此回调。 |
onDeviceInvitationCancelled | 当设备邀请被取消时触发此回调。 |
onDeviceInvitationTimeout | 当设备邀请超时时触发此回调。 |
onDeviceInvitationAccepted | 当设备邀请被接受时触发此回调。 |
onDeviceInvitationDeclined | 当设备邀请被拒绝时触发此回调。 |
属性 | 类型 | 说明 |
participantList | 参与者列表。 | |
participantListCursor | String | 参与者列表游标。 |
audienceList | [RoomUser] | 观众列表(适用于网络研讨会模式)。 |
audienceListCursor | String | 观众列表游标。 |
adminList | [RoomUser] | 管理员列表。 |
messageDisabledUserList | [RoomUser] | 被禁言用户列表。 |
participantListWithVideo | 有视频的参与者列表。 | |
participantWithScreen | 正在屏幕共享的参与者。 | |
pendingDeviceApplications | 待处理的设备申请列表。 | |
pendingDeviceInvitations | 待处理的设备邀请列表。 | |
speakingUsers | [String : Int] | 正在说话的用户及其音量。 |
networkQualities | [String : NetworkInfo] | 用户网络质量信息。 |
pendingParticipantList | 待加入的参与者列表。 | |
localParticipant | 本地参与者信息。 |
文档反馈