@hysc/meeting 3.0.31 → 3.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/esm/boom-meeting/src/BMChat/BMChatVM.d.ts +2 -1
  2. package/esm/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +213 -0
  3. package/esm/boom-meeting/src/BMRoom/BMRoomVM.d.ts +302 -0
  4. package/esm/boom-meeting/src/BMRoom/attachEvents.d.ts +9 -2
  5. package/esm/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +254 -0
  6. package/esm/boom-meeting/src/BMStream/sortStream.d.ts +27 -0
  7. package/esm/boom-meeting/src/BMUser/BMUser.d.ts +12 -3
  8. package/esm/boom-meeting/src/BMUser/BMUserVM.d.ts +15 -11
  9. package/esm/boom-meeting/src/bjy-common/function/getErrorMessage.d.ts +1 -0
  10. package/esm/boom-meeting/src/constants.d.ts +38 -8
  11. package/esm/boom-meeting/src/error/RTCError.d.ts +20 -0
  12. package/esm/boom-meeting/src/error/errorType.d.ts +96 -0
  13. package/esm/boom-meeting/src/handleEvent/attachEvents.d.ts +35 -0
  14. package/esm/boom-meeting/src/handleEvent/handleParticipantEvent.d.ts +19 -0
  15. package/esm/boom-meeting/src/handleEvent/handleRoomEvent.d.ts +12 -0
  16. package/esm/boom-meeting/src/logger/logger.d.ts +86 -0
  17. package/esm/boom-meeting/src/util/Pqueue.d.ts +61 -0
  18. package/esm/boom-meeting/src/util/constant.d.ts +67 -0
  19. package/esm/boom-meeting/src/util/emitter.d.ts +4 -2
  20. package/esm/index.js +1 -1
  21. package/esm/index.js.map +3 -3
  22. package/esm/src/BMStream/sortStream.d.ts +30 -0
  23. package/esm/src/BMUser/BMUserVM.d.ts +1 -1
  24. package/esm/src/handleEvent/attachEvents.d.ts +30 -0
  25. package/esm/src/handleEvent/brtcNetEvent.d.ts +9 -0
  26. package/esm/src/handleEvent/customMessageEvent.d.ts +2 -0
  27. package/esm/src/handleEvent/handleParticipantEvent.d.ts +22 -0
  28. package/esm/src/handleEvent/handleRoomEvent.d.ts +14 -0
  29. package/esm/src/handleEvent/messageEvent.d.ts +5 -0
  30. package/esm/src/handleEvent/pullUser.d.ts +7 -0
  31. package/esm/src/handleEvent/roomErrEvent.d.ts +7 -0
  32. package/esm/src/handleEvent/streamEvent.d.ts +16 -0
  33. package/esm/utils/BoomError.d.ts +21 -0
  34. package/esm/utils/ErrorTypes.d.ts +99 -0
  35. package/esm/utils/index.d.ts +9 -0
  36. package/package.json +3 -3
  37. package/umd/boom-meeting/src/BMChat/BMChatVM.d.ts +2 -1
  38. package/umd/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +213 -0
  39. package/umd/boom-meeting/src/BMRoom/BMRoomVM.d.ts +302 -0
  40. package/umd/boom-meeting/src/BMRoom/attachEvents.d.ts +9 -2
  41. package/umd/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +254 -0
  42. package/umd/boom-meeting/src/BMStream/sortStream.d.ts +27 -0
  43. package/umd/boom-meeting/src/BMUser/BMUser.d.ts +12 -3
  44. package/umd/boom-meeting/src/BMUser/BMUserVM.d.ts +15 -11
  45. package/umd/boom-meeting/src/bjy-common/function/getErrorMessage.d.ts +1 -0
  46. package/umd/boom-meeting/src/constants.d.ts +38 -8
  47. package/umd/boom-meeting/src/error/RTCError.d.ts +20 -0
  48. package/umd/boom-meeting/src/error/errorType.d.ts +96 -0
  49. package/umd/boom-meeting/src/handleEvent/attachEvents.d.ts +35 -0
  50. package/umd/boom-meeting/src/handleEvent/handleParticipantEvent.d.ts +19 -0
  51. package/umd/boom-meeting/src/handleEvent/handleRoomEvent.d.ts +12 -0
  52. package/umd/boom-meeting/src/logger/logger.d.ts +86 -0
  53. package/umd/boom-meeting/src/util/Pqueue.d.ts +61 -0
  54. package/umd/boom-meeting/src/util/constant.d.ts +67 -0
  55. package/umd/boom-meeting/src/util/emitter.d.ts +4 -2
  56. package/umd/index.js +1 -1
  57. package/umd/src/BMStream/BMStreamModel.d.ts +6 -15
  58. package/umd/src/BMUser/BMUserVM.d.ts +1 -1
  59. package/umd/src/type/customStats.d.ts +0 -1
  60. package/umd/src/type/stream.d.ts +2 -0
  61. package/umd/src/util/util.d.ts +1 -1
  62. package/umd/utils/BoomError.d.ts +21 -0
  63. package/umd/utils/ErrorTypes.d.ts +99 -0
  64. package/umd/utils/index.d.ts +9 -0
@@ -0,0 +1,302 @@
1
+ import BoomCore from "@hysc/core";
2
+ import BMRoom from "./BMRoom";
3
+ import BMUserVM from "../BMUser/BMUserVM";
4
+ import BMRoomInfo from "./BMRoomInfo";
5
+ import { HostLayout } from "../type/customStats";
6
+ import { Subject } from "rxjs";
7
+ /**
8
+ * 0 仅支持人 1 嘉宾 2 全员
9
+ */
10
+ export declare type FilePermission = 0 | 1 | 2;
11
+ declare type giveLikeItem = {
12
+ userId: string | undefined;
13
+ nickName: string | undefined;
14
+ time: number;
15
+ type: number;
16
+ };
17
+ export declare type CloudRecord = {
18
+ recordStatus: 0 | 1 | 2;
19
+ userId: string;
20
+ };
21
+ declare type SupportVideoProfile = '180p' | '240p' | '360p' | '480p' | '720p';
22
+ declare type SampleDeviceInfo = {
23
+ name: string;
24
+ };
25
+ interface DeviceList {
26
+ microphoneDeviceList: SampleDeviceInfo[];
27
+ speakerDeviceList: SampleDeviceInfo[];
28
+ videoDeviceList: SampleDeviceInfo[];
29
+ selectVideoDevice: SampleDeviceInfo;
30
+ selectMicrophoneDevice: SampleDeviceInfo;
31
+ selectSpeakerDevice: SampleDeviceInfo;
32
+ videoProfile: SupportVideoProfile;
33
+ echoCancellation: boolean;
34
+ noiseSuppression: boolean;
35
+ autoGainControl: boolean;
36
+ speakerVolume: number;
37
+ }
38
+ export interface AudioProfileInfo {
39
+ /**
40
+ * 音频采集设备
41
+ */
42
+ microphoneDevice?: SampleDeviceInfo;
43
+ /**
44
+ * 音频输出设备
45
+ */
46
+ speakerDevice?: SampleDeviceInfo;
47
+ /**
48
+ * 回音消除
49
+ */
50
+ echoCancellation?: boolean;
51
+ /**
52
+ * 音频降噪
53
+ */
54
+ noiseSuppression?: boolean;
55
+ /**
56
+ * 声音增益
57
+ */
58
+ autoGainControl?: boolean;
59
+ /**
60
+ * 调整扬声器音量 0 - 100
61
+ */
62
+ speakerVolume?: number;
63
+ /**
64
+ * 调整麦克风音量 0 - 100
65
+ */
66
+ microVolume?: number;
67
+ }
68
+ export default class BMRoomVM {
69
+ roomInfo: BMRoomInfo;
70
+ boomCore: BoomCore;
71
+ userVM: BMUserVM;
72
+ giveLikeListWatcher: Subject<Array<giveLikeItem>>;
73
+ giveLikeList: Array<giveLikeItem>;
74
+ private room;
75
+ tipQueueObj: any;
76
+ constructor(boomCore: BoomCore, userVM: any, roomInfo: BMRoomInfo);
77
+ initWithRoom(room: BMRoom): void;
78
+ /**
79
+ * 踢出用户
80
+ * @param {String} userId 用户ID
81
+ * @param {boolean} withoutBlack
82
+ */
83
+ evictUser(userId: string, withoutBlack: boolean): Promise<any>;
84
+ /**
85
+ * 更新用户信息,端上会收到 participant-update 信令
86
+ * @param userId
87
+ * @param info
88
+ */
89
+ updateUser(userId: string, info: any): Promise<undefined>;
90
+ /**
91
+ * 改变主持人
92
+ * @param {String} userId 用户ID
93
+ * @param isKeep
94
+ */
95
+ changeMaster(userId: string, isKeep: boolean): Promise<any>;
96
+ updateManager(userId: string, status: boolean, hasS?: boolean): Promise<import("../BMUser/BMUser").default>;
97
+ /**
98
+ * 改变昵称 需要调用http请求
99
+ * @param {String} userId 用户ID
100
+ * @param {String} nickName 用户ID
101
+ */
102
+ changeNickName(userId: string, nickName: string): Promise<any>;
103
+ /**
104
+ * 主持人send-message
105
+ * @param message 发送的消息
106
+ * @param uid 指定的userId
107
+ */
108
+ sendMessageWithMaster(message: any, uid?: string): Promise<undefined>;
109
+ /**
110
+ * 开关对端麦克风-信令发送
111
+ * @param status true:开,false:关
112
+ * @param uid 用户id
113
+ * @param isNotCancelRootReport 当打开麦克风时, 是否不取消音频权限申请
114
+ */
115
+ setRemoteAudioEnable(status: boolean, uid: string, isNotCancelRootReport: boolean | undefined): Promise<void>;
116
+ /**
117
+ * 开关对端摄像头-信令发送
118
+ * @param status true:开,false:关
119
+ * @param uid 用户id
120
+ */
121
+ setRemoteVideoEnable(status: boolean, uid: string): Promise<void>;
122
+ /**
123
+ * 关闭对端共享屏幕
124
+ * @param uid 用户id
125
+ */
126
+ closeRemoteShare(uid: string): Promise<void>;
127
+ /**
128
+ * 提醒用户
129
+ * @param uid 用户id
130
+ * @param uid msg
131
+ */
132
+ tipUser(uid: string, msg: string, richMsg: object, time: any): Promise<void>;
133
+ /**
134
+ * 举手相关操作
135
+ * @param type 视频还是音频举手 audio/video
136
+ * @param raise 举手还是放下举手 true/false
137
+ */
138
+ raiseHands(type: 'audio' | 'video' | 'raiseHand', raise: boolean): Promise<void>;
139
+ /**
140
+ * 主持人处理举手操作
141
+ * @param raiseHandsType 0 音视频 1 音频 2 视频 3 单纯的举手
142
+ * @param raiseHands true 同意 false 拒绝
143
+ * @param uid 指定的用户Id
144
+ * @description 如果不指定用户ID就是广播处理所有的举手的人员
145
+ */
146
+ handleRaiseHands(raiseHandsType: 0 | 1 | 2 | 3, raiseHands: boolean, uid?: string): Promise<undefined>;
147
+ /**
148
+ * 更新自定义属性 updateCustomStats
149
+ * @param stats
150
+ * @param {boolean} replace 是否替换原数据
151
+ */
152
+ private updateCustomStats;
153
+ /**
154
+ * 发送聊天公告
155
+ * @param notice
156
+ */
157
+ sendChatNotice(notice: string, richNotice: object): Promise<void>;
158
+ /**
159
+ * 是否允许点赞
160
+ * @param enable 0 不允许 1 允许
161
+ */
162
+ giveLikeEnable(enable: 0 | 1): Promise<void>;
163
+ /**
164
+ * 观众点赞(走customMessage)
165
+ * @param type 1:点赞, 2:送花, 3:爱心, 4: 鼓掌, 5: 喝彩
166
+ */
167
+ userGiveLike(type: 1 | 2 | 3 | 4 | 5): Promise<void>;
168
+ /**
169
+ * 聊天是否可用
170
+ * @param enable 0 不允许 1 允许 2仅主持人 3嘉宾
171
+ */
172
+ chatEnable(enable: 0 | 1 | 2 | 3): Promise<void>;
173
+ /**
174
+ * 入会时是否允许开启麦克风
175
+ * @param enable 0全员 1嘉宾 2仅主持人 3全员禁止
176
+ */
177
+ joinAudioEnable(enable: 0 | 1 | 2 | 3): Promise<void>;
178
+ /**
179
+ * 入会时是否允许开启摄像头
180
+ * @param enable 0全员 1嘉宾 2仅主持人 3全员禁止
181
+ */
182
+ joinVideoEnable(enable: 0 | 1 | 2 | 3): Promise<void>;
183
+ /**
184
+ * 参会者列表权限
185
+ * @param enable 0全员 1嘉宾 2仅主持人
186
+ */
187
+ userListEnable(enable: 0 | 1 | 2): Promise<void>;
188
+ /**
189
+ * 会议中是否允许开麦克风
190
+ * @param enable 0全员 1嘉宾 2仅主持人
191
+ */
192
+ audioEnable(enable: 0 | 1 | 2): Promise<void>;
193
+ /**
194
+ * 会议中是否允许开启摄像头
195
+ * @param enable 0全员 1嘉宾 2仅主持人
196
+ */
197
+ videoEnable(enable: 0 | 1 | 2): Promise<void>;
198
+ /**
199
+ * 是否允许自行改名
200
+ * @param enable 0全员 1嘉宾
201
+ */
202
+ modifyNameEnable(enable: 0 | 1 | 2): Promise<void>;
203
+ /**
204
+ * 是否允许开启虚拟背景
205
+ * @param enable 0全员 1嘉宾 2仅主持人
206
+ */
207
+ backgroundAIEnable(enable: 0 | 1 | 2): Promise<void>;
208
+ /**
209
+ * 强制开启对方视频
210
+ * @param enable true开启 false关闭
211
+ */
212
+ forceOpenUserCamera(enable: true | false): Promise<void>;
213
+ /**
214
+ * 强制开启对方音频
215
+ * @param enable true开启 false关闭
216
+ */
217
+ forceOpenUserMic(enable: true | false): Promise<void>;
218
+ /**
219
+ * 入会提示音设置
220
+ * @param enable 0关闭 1开启
221
+ */
222
+ joinCueVoice(enable: 0 | 1): Promise<void>;
223
+ /**
224
+ * 是否全员可录制
225
+ * @param enable 0全员 1嘉宾 2仅主持人
226
+ */
227
+ recordEnable(enable: 0 | 1 | 2): Promise<void>;
228
+ /**
229
+ * 是否全员可录制
230
+ * @param enable 0禁止全员举手 1嘉宾可举手 2全员可举手
231
+ */
232
+ raiseHandEnable(enable: 0 | 1 | 2): Promise<void>;
233
+ /**
234
+ * 入会麦克风禁用
235
+ * @param enable 0全员禁止使用 1嘉宾和学员不可使用 2不开启
236
+ */
237
+ joinMicrophoneDisable(enable: 0 | 1 | 2): Promise<void>;
238
+ /**
239
+ * 入会摄像头禁用
240
+ * @param enable 0全员禁止使用 1嘉宾和学员不可使用 2不开启
241
+ */
242
+ joinCameraDisable(enable: 0 | 1 | 2): Promise<void>;
243
+ /**
244
+ * 上传文档权限
245
+ * @param permission 0 仅支持人 1 嘉宾 2 全员
246
+ */
247
+ changeFileUpdateModelPermission(permission: FilePermission): Promise<void>;
248
+ changeFileUpdateLookPermission(permission: FilePermission): Promise<void>;
249
+ changeFileUpdateDownPermission(permission: FilePermission): Promise<void>;
250
+ changeFileUpdateEditPermission(permission: FilePermission): Promise<void>;
251
+ /**
252
+ * 共享屏幕权限
253
+ * @param permission 0全员可共享 1允许嘉宾共享 2仅主持人可共享
254
+ */
255
+ changeScreenShareModelPermission(permission: 0 | 1 | 2): Promise<void>;
256
+ /**
257
+ * 是否仅一人共享权限
258
+ * @param permission 1: 是 2: 否
259
+ */
260
+ changeOnlyOnePersonSharePermission(permission: 0 | 1): Promise<void>;
261
+ /**
262
+ * 设为焦点主屏
263
+ * @param {string} userid 设为焦点主屏的userId
264
+ */
265
+ setForceOnUser(userid: string): Promise<void>;
266
+ /**
267
+ * 主持人上报布局状态
268
+ * @param layoutData
269
+ * @param replace
270
+ */
271
+ updateHostLayout(layoutData: HostLayout, replace?: boolean): Promise<void>;
272
+ checkDevices(userId: string): Promise<void>;
273
+ resp2CheckDevices(deviceList: DeviceList, userId: string): Promise<void>;
274
+ /**
275
+ * 调节对方的视频分辨率
276
+ * @param {SupportVideoProfile} videoInfo 调节对方视频信息
277
+ * @param {string} userId
278
+ */
279
+ changeRemoteVideoProfile(videoInfo: {
280
+ profile: SupportVideoProfile;
281
+ videoDevice: SampleDeviceInfo;
282
+ }, userId: string): Promise<any>;
283
+ /**
284
+ * 设置完本地的视频分辨率之后,给对方响应
285
+ * @param {boolean} status 设置是否成功
286
+ * @param {string} userId
287
+ */
288
+ resp2ChangeRemoteVideoProfile(status: boolean, userId: string, profile: string): Promise<any>;
289
+ /**
290
+ * 调节远端的音频参数
291
+ * @param {Object} profileInfo
292
+ * @param uid
293
+ */
294
+ changeRemoteAudioProfile(profileInfo: AudioProfileInfo, uid: string): Promise<any>;
295
+ /**
296
+ * 响应调节远端音频的结果
297
+ * @param status
298
+ * @param uid
299
+ */
300
+ resp2ChangeRemoteAudioProfile(status: boolean, uid: string): Promise<any>;
301
+ }
302
+ export {};
@@ -1,10 +1,12 @@
1
1
  import BoomCore from '@hysc/core/esm';
2
2
  import BMStreamModelVM from "../BMStream/BMStreamModelVM";
3
3
  import BMRoom from './BMRoom';
4
+ import { SingleRemoteStream } from '../type';
4
5
  import BMUserVM from "../BMUser/BMUserVM";
5
6
  import BMChatVM from '../BMChat/BMChatVM';
7
+ import { BehaviorSubject } from 'rxjs';
6
8
  import BMStreamModel from "../BMStream/BMStreamModel";
7
- export declare const shouldProcessQueue: Map<string, import("@hysc/core/esm/BoomAdapter/singleMode/stream/RemoteStream").default>;
9
+ import { BCEvent } from "@hysc/core/src/BoomCore/BCClient/clientEventType";
8
10
  /**
9
11
  * 收到消息信令的集合
10
12
  */
@@ -22,6 +24,11 @@ export declare enum MessageType {
22
24
  */
23
25
  AUDIO_FORCE_CHANGE = "audio-force-change"
24
26
  }
27
+ export declare function getStreamFromBrtcStreamMap(remoteStream: SingleRemoteStream): import("@hysc/core/esm/BoomAdapter/singleMode/stream/RemoteStream").default | undefined;
25
28
  export declare function attachBRTCEvent(boomCore: BoomCore, bmStreamVm: BMStreamModelVM, userVM: BMUserVM): void;
26
- export declare function attachEvents(boomCore: BoomCore, userVM: BMUserVM, bmStreamVm: BMStreamModelVM, chatVM: BMChatVM, bmRoom: BMRoom): any;
29
+ declare type Observes = {
30
+ [K in BCEvent]: BehaviorSubject<any>;
31
+ };
32
+ export declare function attachEvents(boomCore: BoomCore, userVM: BMUserVM, bmStreamVm: BMStreamModelVM, chatVM: BMChatVM, bmRoom: BMRoom): Observes;
27
33
  export declare function checkStreamIsNormal(streamModel: BMStreamModel | undefined): void;
34
+ export {};
@@ -0,0 +1,254 @@
1
+ /**
2
+ * @name: BMStreamModelVM
3
+ * @author: yangliye
4
+ * @date: 2022-04-27 15:25
5
+ * @description:BMStreamModelVM
6
+ * @update: 2022-04-27 15:25
7
+ * @description
8
+ * 这个模块的功能是去管理展示窗口的处理逻辑,主要包括创建streamModel,更新streamModel(主要是流相关信息的更新,和用户更新)
9
+ * 创建streamModel的操作:
10
+ * 初始化整个流程是根据bloud的用户来创建的
11
+ * 然后在根据brtc里面流的信息来更新对应的streamModel
12
+ * bloud的用户和brtc的流信息是根据uid来进行关联。
13
+ *
14
+ * 共享屏幕用户做了特殊处理,因为web端共享屏幕和移动端共享屏幕处理逻辑不一样
15
+ */
16
+ /// <reference types="node" />
17
+ import BMStreamModel, { NoPlayerContainer } from "./BMStreamModel";
18
+ import BMUser from '../BMUser/BMUser';
19
+ import { SingleLocalStream, SingleRemoteStream, SingleStream } from '../type';
20
+ import BMRoom from '../BMRoom/BMRoom';
21
+ import { BehaviorSubject, Subject } from 'rxjs';
22
+ import { Device } from '@hysc/core/esm/BoomAdapter/type/value';
23
+ import BMSpeaker from './BMSpeaker';
24
+ import { ShareMediaOptions } from "@hysc/core/esm/BoomCore/BCClient/BCClient";
25
+ import { getHTMLMediaStreamOptions, Result, getMediaStreamInfo } from "./getHTMLMediaStreamOptions";
26
+ export declare function transShareScreen2User(userId: string): string;
27
+ export declare const pubFailedStreamMap: Map<string, import("@hysc/core/esm/BoomAdapter/singleMode/stream/RemoteStream").default>;
28
+ /**
29
+ * 全量的brtc流记录,把所有brtc用户推的流都做记录
30
+ * stream-added 的时候添加
31
+ * stream-removed 的时候删除
32
+ * mute/unmute-video/audio 的时候更新流
33
+ * 当用户进来的时候,去查看这个流对象,如果流存在,就给这个人添加流
34
+ *
35
+ */
36
+ export declare const BRTCStreamMap: Map<string, import("@hysc/core/esm/BoomAdapter/singleMode/stream/RemoteStream").default>;
37
+ export declare const BRTCShareStreamMap: Map<string, import("@hysc/core/esm/BoomAdapter/singleMode/stream/RemoteStream").default>;
38
+ export default class BMStreamModelVM {
39
+ streamModels: Map<string, BMStreamModel>;
40
+ /**
41
+ * 因为投屏码用户进来以后,他是不在小窗口展示的,所以要把投屏的用户过滤掉给业务的展示
42
+ */
43
+ streamModelsWatcher: BehaviorSubject<BMStreamModel[]>;
44
+ shareStreamModels: Map<string, BMStreamModel>;
45
+ shareStreamModelsWatcher: BehaviorSubject<BMStreamModel[]>;
46
+ localStreamErrorWatcher: Subject<string>;
47
+ localModel: BMStreamModel | null;
48
+ private room;
49
+ bloudStream: any;
50
+ audioStream: SingleLocalStream | undefined;
51
+ brtcStream: SingleLocalStream | undefined;
52
+ /**
53
+ * 本地是否在屏幕共享
54
+ */
55
+ localIsShare: boolean;
56
+ _speaker_enable: boolean;
57
+ speakerEnableWatcher: BehaviorSubject<boolean>;
58
+ /**
59
+ * 混流
60
+ */
61
+ mixStreamModelWatcher: BehaviorSubject<BMStreamModel | null>;
62
+ isShareWatcher: Subject<boolean>;
63
+ canvasTimer: NodeJS.Timeout | null;
64
+ /**
65
+ * 后面打开摄像头存储的流,主要是关闭摄像头的时候得把它清除掉
66
+ */
67
+ videoStream: SingleLocalStream | null;
68
+ private _recorder;
69
+ private _isRecording;
70
+ private _slicingRecord;
71
+ isRecordingWatcher: BehaviorSubject<boolean>;
72
+ private _speaker;
73
+ private _speakerDetector;
74
+ private _speakers;
75
+ speakerWatcher: BehaviorSubject<BMUser | null>;
76
+ /**
77
+ * 窗口没有播放容器的错误处理
78
+ */
79
+ noContainerWatcher: Subject<BMStreamModel>;
80
+ /**
81
+ * 窗口没有大窗口播放容器的错误处理
82
+ */
83
+ noBigContainerWatcher: Subject<BMStreamModel>;
84
+ constructor();
85
+ private static filterStreamModels;
86
+ initWithRoom(room: BMRoom): this;
87
+ /**
88
+ * 设置扬声器是否打开
89
+ * @param enable
90
+ * @private
91
+ */
92
+ private setSpeakerEnable;
93
+ getStreamModels(): Array<BMStreamModel>;
94
+ /**
95
+ * 获取streamModel
96
+ * @param userId 用户Id
97
+ * @returns
98
+ */
99
+ getStreamModelByUId(userId: string): BMStreamModel | undefined;
100
+ getShareStreamModelByUId(userId: string): BMStreamModel | undefined;
101
+ getLocalStreamModel(): BMStreamModel | null;
102
+ createStreamModel(user: BMUser, stream?: SingleStream): BMStreamModel;
103
+ addStreamModel(streamModel: BMStreamModel): void;
104
+ addShareStreamModel(streamModel: BMStreamModel): void;
105
+ removeStreamModel(streamModel: BMStreamModel): void;
106
+ removeShareStreamModel(streamModel: BMStreamModel): void;
107
+ /**`
108
+ * 通过用户id删除streamModel
109
+ * @param userId
110
+ * @returns
111
+ */
112
+ removeStreamModelByUId(userId: string): BMStreamModel | undefined;
113
+ remoteStreamPublished(stream: SingleRemoteStream): void;
114
+ /**
115
+ * 有人取消流触发,有人取消流之后brtc底层会把流销毁掉,除了流Id和userId,其他的信息都不稳定能取到
116
+ * @param stream
117
+ * @returns
118
+ */
119
+ remoteStreamUnpublished(stream: SingleRemoteStream): BMStreamModel | undefined;
120
+ sortStreamModels(): BMStreamModel[];
121
+ updateStreamModel(streamModel: BMStreamModel, stream: SingleStream): void;
122
+ updateShareStreamModel(streamModel: BMStreamModel, stream: SingleStream): void;
123
+ /**
124
+ * 开关本地摄像头
125
+ * @param status true:开,false:关
126
+ * @param videoTrack 开启美颜之后,需要传递这个参数,携带美颜之后的videoTrack
127
+ */
128
+ setLocalVideoEnable(status: boolean, videoTrack?: MediaStreamTrack): Promise<void>;
129
+ /**
130
+ * 开关本地麦克风
131
+ * @param status true:开,false:关
132
+ */
133
+ setLocalAudioEnable(status: boolean): Promise<undefined>;
134
+ /**
135
+ * 该方法只是在入会的时候,同时开启音频和视频的时候使用,其他时候禁止使用该方法
136
+ * 切换音频和视频状态请使用 setLocalAudioEnable 和 setLocalVideoEnable
137
+ * @param audio
138
+ * @param video
139
+ */
140
+ joinWithAudioAndAudio(audio: boolean, video: boolean): Promise<undefined>;
141
+ /**
142
+ * 切换扬声器
143
+ * @param device
144
+ */
145
+ changeSpeaker(device: Device): Promise<void>;
146
+ /**
147
+ * 设置单个流的扬声器
148
+ * @param streamModel
149
+ */
150
+ changeSingleStreamSpeaker(streamModel: BMStreamModel): Promise<void>;
151
+ changeAudioInput(device: Device): Promise<void>;
152
+ changeVideoInput(device: Device): Promise<void>;
153
+ /**
154
+ * 是否静音扬声器
155
+ * @param enable
156
+ */
157
+ muteSpeaker(enable: boolean): Promise<undefined>;
158
+ /**
159
+ * 创建流并且发布
160
+ * @param audio 是否发布音频流
161
+ * @param video 是否发布视频流
162
+ * @param localModel 本地的streamModel
163
+ * @param videoTrack
164
+ * @private
165
+ */
166
+ private createStreamAndPublish;
167
+ muteHandler(type: 'video' | 'audio'): Promise<void>;
168
+ /**
169
+ * 更改音视频状态或者取消发布
170
+ * @param type 更改类型
171
+ * @param mute 是否取消发布
172
+ * @param localModel 本地的streamModel
173
+ * @private
174
+ */
175
+ private muteOrUnpublishStream;
176
+ /**
177
+ * 是否开启屏幕共享
178
+ * @param enable
179
+ * @param opts 开启屏幕共享参数
180
+ * @param customShare
181
+ * @param opts.audio 是否开启音频
182
+ * @param opts.source_name Electron 下窗口名称
183
+ * @param opts.width 共享屏幕宽度
184
+ * @param opts.height 共享屏幕高度
185
+ * @param opts.contentHint 视频的contentHint 可选值: '' | 'motion' | 'detail' | 'text'
186
+ */
187
+ toggleShareScreen(enable: boolean, opts: any, customShare?: Result): Promise<boolean>;
188
+ setShareScreenContentHint(contentHint: '' | 'motion' | 'detail' | 'text'): Promise<void>;
189
+ /**
190
+ * 排序变化之后的处理逻辑
191
+ */
192
+ updateUserSort: any;
193
+ updateModelSort: any;
194
+ handleNoContainer: (info: NoPlayerContainer) => void;
195
+ /**
196
+ * 创建canvas,目的是为了捕获空track流,给brtc使用
197
+ */
198
+ createCanvas(): void;
199
+ private canvasDisplay;
200
+ private static getCanvasStream;
201
+ private createVideoStream;
202
+ /**
203
+ * 启动录制
204
+ * @param {String} opts.filename - 录制文件名
205
+ * @param {Object} opts.capture - 采集属性
206
+ * @param {Number} opts.capture.width - 宽度
207
+ * @param {Number} opts.capture.height - 高度
208
+ * @param {Number} opts.capture.fps - 帧率
209
+ * @param {Number} opts.record - 编码属性
210
+ * @param {Number} opts.record.bitrate - 编码码率
211
+ * @param {String|undefined} opts.record.format - 编码格式
212
+ * @return {boolean}
213
+ */
214
+ startRecord(opts: any): Promise<boolean | undefined>;
215
+ /**
216
+ * 添加流对象到录制器,用于音频轨道录制
217
+ * @param stream
218
+ */
219
+ addToRecorder(stream: any): void;
220
+ /**
221
+ * 从录制器中删除流对象
222
+ * @param stream
223
+ */
224
+ removeFromRecorder(stream: any): void;
225
+ /**
226
+ * 停止录制
227
+ */
228
+ stopRecord(): Promise<void>;
229
+ /**
230
+ * 启用下一个录制分片
231
+ * @param filename - 下一分片文件名
232
+ */
233
+ sliceRecord(filename: string): Promise<boolean | undefined>;
234
+ /**
235
+ * 启动说话人检测器
236
+ */
237
+ startSpeakerDetector(): void;
238
+ addToDetector(speaker: BMSpeaker): void;
239
+ removeFromDetector(speakerId: string): void;
240
+ shareCustomMedia(enable: boolean, shareOptions: ShareMediaOptions): Promise<undefined>;
241
+ /**
242
+ * 根据videoElement 获取内部流数据
243
+ */
244
+ getHTMLMediaStream: typeof getHTMLMediaStreamOptions;
245
+ getMediaStream: typeof getMediaStreamInfo;
246
+ /**
247
+ * brtc断网重连之后,不知道在断网期间有那些用户取消了推流,
248
+ * 然后如果是brtc的ws没重连上,然后自己走的重新入会重连的话,就会导致
249
+ * 可能存在本地的流有一部分可能是不存在的流了,这个方法就是在重连入会之后
250
+ * 把所有远端流清空
251
+ */
252
+ resetAllRemoteStream(): void;
253
+ clearCache(): void;
254
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @name: sortStream
3
+ * @author: yangliye
4
+ * @date: 2023-04-18 11:40
5
+ * @description:sortStream
6
+ * @update: 2023-04-18 11:40
7
+ */
8
+ export declare function getMasterSort(): number;
9
+ export declare function getLocalSort(): number;
10
+ /**
11
+ * 8 - 11
12
+ * @param a
13
+ * @param v
14
+ */
15
+ export declare function getManagerSort(a: boolean, v: boolean): number;
16
+ /**
17
+ * 取值范围 4 - 7
18
+ * @param a
19
+ * @param v
20
+ */
21
+ export declare function getGuestSort(a: boolean, v: boolean): number;
22
+ /**
23
+ * 取值范围 0 - 3
24
+ * @param a
25
+ * @param v
26
+ */
27
+ export declare function getCommonSort(a: boolean, v: boolean): number;
@@ -2,7 +2,7 @@ import BMStreamModel from '../BMStream/BMStreamModel';
2
2
  import { BehaviorSubject } from 'rxjs';
3
3
  import BCUser from '@hysc/core/esm/BoomAdapter/User/User';
4
4
  import BMRoom from '../BMRoom/BMRoom';
5
- declare type Operation = 'none' | 'getMaster' | 'getManager' | 'removeMaster' | 'getGuest' | 'removeGuest' | 'removeManager' | 'changeNickName' | 'speakerEnable' | 'changeShare' | 'updateUser' | 'raiseHandsVideo' | 'raiseHandsAudio' | 'audienceEnableSpeaking';
5
+ export declare type Operation = 'none' | 'getMaster' | 'getManager' | 'removeMaster' | 'getGuest' | 'removeGuest' | 'removeManager' | 'changeNickName' | 'speakerEnable' | 'changeShare' | 'updateUser' | 'raiseHandsVideo' | 'raiseHandsAudio' | 'audienceEnableSpeaking' | 'inBackground' | 'raiseHand';
6
6
  interface IUserActionWatcher {
7
7
  operation: Operation;
8
8
  user: BMUser;
@@ -19,7 +19,7 @@ interface UserInfo {
19
19
  };
20
20
  }
21
21
  export interface RaiseHandInfo {
22
- status: 'raiseHandsAudio' | 'raiseHandsVideo';
22
+ status: 'raiseHandsAudio' | 'raiseHandsVideo' | 'raiseHand';
23
23
  user: BMUser;
24
24
  }
25
25
  export default class BMUser {
@@ -57,6 +57,7 @@ export default class BMUser {
57
57
  * 'changeShare': 是否在屏幕共享
58
58
  * 'raiseHandsVideo': 是否视频举手
59
59
  * 'raiseHandsAudio': 是否音频举手
60
+ * 'raiseHand':单纯的举手
60
61
  * @property {BMUser} user
61
62
  */
62
63
  watcher: BehaviorSubject<IUserActionWatcher>;
@@ -69,11 +70,17 @@ export default class BMUser {
69
70
  */
70
71
  raiseVideoHands: boolean;
71
72
  raiseAudioHands: boolean;
73
+ raiseHand: boolean;
72
74
  isAudience: boolean;
73
75
  /**
74
76
  * 是不是普通参会者
75
77
  */
76
78
  isCommonUser: boolean;
79
+ /**
80
+ * 如果改用户是移动端, 该值用于判断这个用户是否在后台
81
+ */
82
+ inBackground: boolean;
83
+ raiseHandTime: number;
77
84
  /**
78
85
  * 是不是web端入会
79
86
  */
@@ -81,6 +88,7 @@ export default class BMUser {
81
88
  constructor(user: any, isLocal?: boolean);
82
89
  setup(userId: string, userinfo: UserInfo, nickname: string): void;
83
90
  getMainStreamModel(): BMStreamModel | undefined;
91
+ get nickname(): string;
84
92
  getShareStreamModel(): BMStreamModel | undefined;
85
93
  /**
86
94
  * 获取用户麦克风开启状态
@@ -142,6 +150,7 @@ export default class BMUser {
142
150
  /**
143
151
  * 更新当前用户的排序
144
152
  */
145
- updateSortNum(): void;
153
+ updateSortNum(force?: boolean): void;
154
+ setSortNum(sortNum: number, force: boolean): void;
146
155
  }
147
156
  export {};