@hysc/meeting 4.0.1 → 4.0.3
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.
- package/esm/boom-core/src/BoomCore/BCClient/clientEventType.d.ts +11 -8
- package/esm/boom-meeting/src/BMChat/BMChatVM.d.ts +2 -1
- package/esm/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +213 -0
- package/esm/boom-meeting/src/BMRoom/BMRoomVM.d.ts +302 -0
- package/esm/boom-meeting/src/BMRoom/attachEvents.d.ts +9 -2
- package/esm/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +254 -0
- package/esm/boom-meeting/src/BMUser/BMUser.d.ts +12 -3
- package/esm/boom-meeting/src/BMUser/BMUserVM.d.ts +15 -11
- package/esm/boom-meeting/src/bjy-common/function/getErrorMessage.d.ts +1 -0
- package/esm/boom-meeting/src/constants.d.ts +38 -8
- package/esm/boom-meeting/src/error/RTCError.d.ts +20 -0
- package/esm/boom-meeting/src/error/errorType.d.ts +96 -0
- package/esm/boom-meeting/src/handleEvent/attachEvents.d.ts +35 -0
- package/esm/boom-meeting/src/handleEvent/handleParticipantEvent.d.ts +19 -0
- package/esm/boom-meeting/src/handleEvent/handleRoomEvent.d.ts +12 -0
- package/esm/boom-meeting/src/logger/logger.d.ts +86 -0
- package/esm/boom-meeting/src/util/Pqueue.d.ts +61 -0
- package/esm/boom-meeting/src/util/constant.d.ts +67 -0
- package/esm/boom-meeting/src/util/emitter.d.ts +4 -2
- package/esm/index.js +2 -2
- package/esm/index.js.map +3 -3
- package/esm/src/BMChat/BMChatVM.d.ts +25 -25
- package/esm/src/BMChat/BMMessageInfo.d.ts +31 -31
- package/esm/src/BMRoom/BMLiveVM.d.ts +35 -35
- package/esm/src/BMRoom/BMRoomInfo.d.ts +213 -213
- package/esm/src/BMRoom/BMRoomVM.d.ts +302 -302
- package/esm/src/BMRoom/attachEvents.d.ts +34 -34
- package/esm/src/BMStream/BMStreamModelVM.d.ts +254 -254
- package/esm/src/BMUser/BMUser.d.ts +156 -156
- package/esm/src/BMUser/BMUserVM.d.ts +141 -141
- package/esm/src/bjy-common/function/getErrorMessage.d.ts +1 -1
- package/esm/src/constants.d.ts +113 -113
- package/esm/src/error/RTCError.d.ts +20 -20
- package/esm/src/error/errorType.d.ts +96 -96
- package/esm/src/handleEvent/attachEvents.d.ts +35 -0
- package/esm/src/handleEvent/handleParticipantEvent.d.ts +19 -0
- package/esm/src/handleEvent/handleRoomEvent.d.ts +12 -0
- package/esm/src/logger/logger.d.ts +86 -86
- package/esm/src/util/Pqueue.d.ts +61 -61
- package/esm/src/util/constant.d.ts +67 -67
- package/esm/src/util/emitter.d.ts +20 -20
- package/esm/utils/BoomError.d.ts +21 -0
- package/esm/utils/ErrorTypes.d.ts +99 -0
- package/esm/utils/index.d.ts +9 -0
- package/package.json +4 -4
- package/umd/boom-core/src/BoomCore/BCClient/clientEventType.d.ts +11 -8
- package/umd/boom-meeting/src/BMChat/BMChatVM.d.ts +2 -1
- package/umd/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +213 -0
- package/umd/boom-meeting/src/BMRoom/BMRoomVM.d.ts +302 -0
- package/umd/boom-meeting/src/BMRoom/attachEvents.d.ts +9 -2
- package/umd/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +254 -0
- package/umd/boom-meeting/src/BMUser/BMUser.d.ts +12 -3
- package/umd/boom-meeting/src/BMUser/BMUserVM.d.ts +15 -11
- package/umd/boom-meeting/src/bjy-common/function/getErrorMessage.d.ts +1 -0
- package/umd/boom-meeting/src/constants.d.ts +38 -8
- package/umd/boom-meeting/src/error/RTCError.d.ts +20 -0
- package/umd/boom-meeting/src/error/errorType.d.ts +96 -0
- package/umd/boom-meeting/src/handleEvent/attachEvents.d.ts +35 -0
- package/umd/boom-meeting/src/handleEvent/handleParticipantEvent.d.ts +19 -0
- package/umd/boom-meeting/src/handleEvent/handleRoomEvent.d.ts +12 -0
- package/umd/boom-meeting/src/logger/logger.d.ts +86 -0
- package/umd/boom-meeting/src/util/Pqueue.d.ts +61 -0
- package/umd/boom-meeting/src/util/constant.d.ts +67 -0
- package/umd/boom-meeting/src/util/emitter.d.ts +4 -2
- package/umd/index.js +2 -2
- package/umd/utils/BoomError.d.ts +21 -0
- package/umd/utils/ErrorTypes.d.ts +99 -0
- package/umd/utils/index.d.ts +9 -0
|
@@ -1,302 +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
|
+
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,34 +1,34 @@
|
|
|
1
|
-
import BoomCore from '@hysc/core/esm';
|
|
2
|
-
import BMStreamModelVM from "../BMStream/BMStreamModelVM";
|
|
3
|
-
import BMRoom from './BMRoom';
|
|
4
|
-
import { SingleRemoteStream } from '../type';
|
|
5
|
-
import BMUserVM from "../BMUser/BMUserVM";
|
|
6
|
-
import BMChatVM from '../BMChat/BMChatVM';
|
|
7
|
-
import { BehaviorSubject } from 'rxjs';
|
|
8
|
-
import BMStreamModel from "../BMStream/BMStreamModel";
|
|
9
|
-
import { BCEvent } from "@hysc/core/src/BoomCore/BCClient/clientEventType";
|
|
10
|
-
/**
|
|
11
|
-
* 收到消息信令的集合
|
|
12
|
-
*/
|
|
13
|
-
export declare enum MessageType {
|
|
14
|
-
/**
|
|
15
|
-
* 初始化watcher用
|
|
16
|
-
*/
|
|
17
|
-
INIT = "init",
|
|
18
|
-
/**
|
|
19
|
-
* 收到远端控制本地摄像头的消息
|
|
20
|
-
*/
|
|
21
|
-
VIDEO_FORCE_CHANGE = "video-force-change",
|
|
22
|
-
/**
|
|
23
|
-
* 收到远端控制本地麦克风的消息
|
|
24
|
-
*/
|
|
25
|
-
AUDIO_FORCE_CHANGE = "audio-force-change"
|
|
26
|
-
}
|
|
27
|
-
export declare function getStreamFromBrtcStreamMap(remoteStream: SingleRemoteStream): import("@hysc/core/esm/BoomAdapter/singleMode/stream/RemoteStream").default | undefined;
|
|
28
|
-
export declare function attachBRTCEvent(boomCore: BoomCore, bmStreamVm: BMStreamModelVM, userVM: BMUserVM): void;
|
|
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;
|
|
33
|
-
export declare function checkStreamIsNormal(streamModel: BMStreamModel | undefined): void;
|
|
34
|
-
export {};
|
|
1
|
+
import BoomCore from '@hysc/core/esm';
|
|
2
|
+
import BMStreamModelVM from "../BMStream/BMStreamModelVM";
|
|
3
|
+
import BMRoom from './BMRoom';
|
|
4
|
+
import { SingleRemoteStream } from '../type';
|
|
5
|
+
import BMUserVM from "../BMUser/BMUserVM";
|
|
6
|
+
import BMChatVM from '../BMChat/BMChatVM';
|
|
7
|
+
import { BehaviorSubject } from 'rxjs';
|
|
8
|
+
import BMStreamModel from "../BMStream/BMStreamModel";
|
|
9
|
+
import { BCEvent } from "@hysc/core/src/BoomCore/BCClient/clientEventType";
|
|
10
|
+
/**
|
|
11
|
+
* 收到消息信令的集合
|
|
12
|
+
*/
|
|
13
|
+
export declare enum MessageType {
|
|
14
|
+
/**
|
|
15
|
+
* 初始化watcher用
|
|
16
|
+
*/
|
|
17
|
+
INIT = "init",
|
|
18
|
+
/**
|
|
19
|
+
* 收到远端控制本地摄像头的消息
|
|
20
|
+
*/
|
|
21
|
+
VIDEO_FORCE_CHANGE = "video-force-change",
|
|
22
|
+
/**
|
|
23
|
+
* 收到远端控制本地麦克风的消息
|
|
24
|
+
*/
|
|
25
|
+
AUDIO_FORCE_CHANGE = "audio-force-change"
|
|
26
|
+
}
|
|
27
|
+
export declare function getStreamFromBrtcStreamMap(remoteStream: SingleRemoteStream): import("@hysc/core/esm/BoomAdapter/singleMode/stream/RemoteStream").default | undefined;
|
|
28
|
+
export declare function attachBRTCEvent(boomCore: BoomCore, bmStreamVm: BMStreamModelVM, userVM: BMUserVM): void;
|
|
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;
|
|
33
|
+
export declare function checkStreamIsNormal(streamModel: BMStreamModel | undefined): void;
|
|
34
|
+
export {};
|