@xylink/xy-rtc-sdk 3.9.1-beta.6 → 3.10.0-beta.4
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/lib/action/index.d.ts +103 -20
- package/lib/enum/client.d.ts +1 -1
- package/lib/enum/{contraints.d.ts → constraints.d.ts} +6 -0
- package/lib/enum/device.d.ts +34 -0
- package/lib/enum/errorCode.d.ts +7 -1
- package/lib/enum/i18n.d.ts +6 -0
- package/lib/enum/index.d.ts +70 -12
- package/lib/enum/meeting.d.ts +4 -0
- package/lib/feature/index.d.ts +1 -0
- package/lib/feature/speaker.d.ts +61 -0
- package/lib/index.d.ts +13 -10
- package/lib/main/ability/const.d.ts +2 -0
- package/lib/main/ability/index.d.ts +31 -0
- package/lib/main/{iauth.d.ts → auth.d.ts} +8 -8
- package/lib/main/client.d.ts +203 -97
- package/lib/main/clientImplements.d.ts +99 -0
- package/lib/main/deviceManager.d.ts +150 -93
- package/lib/main/helper.d.ts +62 -9
- package/lib/main/layout/index.d.ts +377 -0
- package/lib/main/layout/template.d.ts +64 -0
- package/lib/main/meeting.d.ts +32 -26
- package/lib/main/peer.d.ts +3 -1
- package/lib/main/stream.d.ts +47 -21
- package/lib/main/videoManager.d.ts +95 -12
- package/lib/tools/{audioLevel.d.ts → analyser.d.ts} +11 -4
- package/lib/tools/browser.d.ts +60 -49
- package/lib/tools/httpClient.d.ts +27 -6
- package/lib/tools/index.d.ts +12 -5
- package/lib/tools/{logger.d.ts → log/logger.d.ts} +18 -7
- package/lib/tools/log/loggerManager.d.ts +69 -0
- package/lib/tools/promiseQueue.d.ts +45 -0
- package/lib/tools/queue.d.ts +12 -15
- package/lib/tools/resize.d.ts +62 -0
- package/lib/tools/snapshot.d.ts +31 -0
- package/lib/tools/socket.d.ts +99 -32
- package/lib/tools/template/index.d.ts +324 -0
- package/lib/tools/template/mobile.d.ts +9 -0
- package/lib/tools/utils.d.ts +13 -5
- package/lib/type/ability.d.ts +25 -0
- package/lib/type/analyser.d.ts +18 -0
- package/lib/type/{iauth.d.ts → auth.d.ts} +0 -7
- package/lib/type/base.d.ts +16 -0
- package/lib/type/client.d.ts +164 -150
- package/lib/type/device.d.ts +103 -31
- package/lib/type/index.d.ts +3 -1
- package/lib/type/layout.d.ts +198 -13
- package/lib/type/logger.d.ts +19 -1
- package/lib/type/meeting.d.ts +294 -10
- package/lib/type/socket.d.ts +60 -0
- package/lib/type/stream.d.ts +21 -13
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +7 -5
- package/lib/main/layoutManager.d.ts +0 -244
- package/lib/tools/template.d.ts +0 -21
- /package/lib/tools/{logger.worker.d.ts → log/logger.worker.d.ts} +0 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XYLink WebRTC Layout Manager Lib
|
|
3
|
+
*
|
|
4
|
+
* @summary management custom layout list data
|
|
5
|
+
* @author jinghui-Luo
|
|
6
|
+
* @email luojinghui424@gmail.com
|
|
7
|
+
*
|
|
8
|
+
* Created at : 2021-01-05 17:24:07
|
|
9
|
+
* Last modified : 2023-11-10 16:53:05
|
|
10
|
+
*/
|
|
11
|
+
import Logger from '../../tools/log/logger';
|
|
12
|
+
import { ILayout, IVideoRenders, IRoster, IScreenInfo, IOutputCustomLayout, ILayoutRoster, IConfInfo, IPageInfo, VideoQuality, StreamResolutionLevel, TLayoutMap, TemplateMode, ContentTemplateMode, IMode, LayoutOrientationType, LocalViewParams } from '../../type/index';
|
|
13
|
+
import Client from '../client';
|
|
14
|
+
export default class LayoutManager {
|
|
15
|
+
logger: Logger;
|
|
16
|
+
client: Client;
|
|
17
|
+
customLayoutMap: TLayoutMap;
|
|
18
|
+
layoutMap: TLayoutMap;
|
|
19
|
+
private videoManagers;
|
|
20
|
+
private slaveVideoManagers;
|
|
21
|
+
private originOrderRosters;
|
|
22
|
+
private orderRosterList;
|
|
23
|
+
private selfRoster;
|
|
24
|
+
private newLayoutList;
|
|
25
|
+
private initLayout;
|
|
26
|
+
private templateMode;
|
|
27
|
+
private templateModeTemp;
|
|
28
|
+
private templateRate;
|
|
29
|
+
private content;
|
|
30
|
+
private screenInfo;
|
|
31
|
+
private internalsLayout;
|
|
32
|
+
private forceFullScreenId;
|
|
33
|
+
private localContent;
|
|
34
|
+
private preConfInfo;
|
|
35
|
+
private confInfo;
|
|
36
|
+
private pageInfo;
|
|
37
|
+
private isLocalShareContent;
|
|
38
|
+
private templateManager;
|
|
39
|
+
private focusViewConfig;
|
|
40
|
+
private layoutOrientation;
|
|
41
|
+
private localMirror;
|
|
42
|
+
constructor(client: Client);
|
|
43
|
+
static getCustomLayoutItem(item: ILayout, resolution: StreamResolutionLevel, quality: VideoQuality): {
|
|
44
|
+
pid: number;
|
|
45
|
+
resolution: StreamResolutionLevel;
|
|
46
|
+
quality: VideoQuality;
|
|
47
|
+
mediagroupid: number;
|
|
48
|
+
};
|
|
49
|
+
getNewLayout(): ILayout[];
|
|
50
|
+
getOrderRosterList(): IRoster[];
|
|
51
|
+
getOriginOrderRosters(): IRoster[];
|
|
52
|
+
getTemplateRate(): {
|
|
53
|
+
previous: number;
|
|
54
|
+
next: number;
|
|
55
|
+
};
|
|
56
|
+
getContentRosterItem(): IRoster | null;
|
|
57
|
+
getSelfRoster(): IRoster;
|
|
58
|
+
getScreenInfo(): IScreenInfo;
|
|
59
|
+
getVideoManagers(): IVideoRenders;
|
|
60
|
+
getForceFullScreenId(): string;
|
|
61
|
+
getTemplateMode(): TemplateMode | ContentTemplateMode;
|
|
62
|
+
getConfInfo(): IConfInfo;
|
|
63
|
+
getInternalsLayout(): IOutputCustomLayout;
|
|
64
|
+
getLocalShareState(): boolean;
|
|
65
|
+
getLayoutMap(): TLayoutMap;
|
|
66
|
+
setOrderRosterList(orderRosterList: IRoster[]): void;
|
|
67
|
+
setOriginOrderRosters(originOrderRosters: IRoster[]): void;
|
|
68
|
+
/**
|
|
69
|
+
* 维护 Local roster 状态
|
|
70
|
+
*
|
|
71
|
+
* @param { Partial<IRoster> } data - 需要更新的roster数据
|
|
72
|
+
*/
|
|
73
|
+
setLocalStatus(data: Partial<IRoster>): void;
|
|
74
|
+
/**
|
|
75
|
+
* 设置发布全屏layout id
|
|
76
|
+
*
|
|
77
|
+
* @param { string } id - forceLayout roster id
|
|
78
|
+
*/
|
|
79
|
+
setForceFullScreenId(id?: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* 设置content信息
|
|
82
|
+
*
|
|
83
|
+
* @param { IRoster | null } content - 共享内容
|
|
84
|
+
*/
|
|
85
|
+
setContentRosterItem(content: IRoster | null): void;
|
|
86
|
+
/**
|
|
87
|
+
* 设置confInfo
|
|
88
|
+
*
|
|
89
|
+
* @param { IConfInfo } confInfo - Conf Change消息
|
|
90
|
+
*/
|
|
91
|
+
setConfInfo(confInfo: IConfInfo): void;
|
|
92
|
+
/**
|
|
93
|
+
* [AUTO] 分页
|
|
94
|
+
*
|
|
95
|
+
* @param { number } currentPage - 请求某一页数据
|
|
96
|
+
*/
|
|
97
|
+
setPageInfo(currentPage?: number): void;
|
|
98
|
+
/**
|
|
99
|
+
* 本地分享content, 设置对应布局、页码
|
|
100
|
+
*
|
|
101
|
+
* @param { boolean } is - 本地是否分享content
|
|
102
|
+
*/
|
|
103
|
+
setLocalShareContent(is: boolean): void;
|
|
104
|
+
/**
|
|
105
|
+
* 回调 video 状态
|
|
106
|
+
* state === (roster当前状态 + 上一次的status)
|
|
107
|
+
*
|
|
108
|
+
* @param { string } rosterId - 参会者唯一ID,由roster中的id得到
|
|
109
|
+
* @param { status: string; error?: any } data - 最新的会议状态 status === video track / video标签 监听到的状态
|
|
110
|
+
*/
|
|
111
|
+
private onVideoStatusChange;
|
|
112
|
+
/**
|
|
113
|
+
* 绑定视频容器信息,SDK接管并播放视频流
|
|
114
|
+
*
|
|
115
|
+
* @param { string } rosterId - 参会者唯一ID,由endpointId + mediagroupId组成
|
|
116
|
+
* @param { string } viewId - 包裹Video组件的元素ID,此元素指定宽高信息,SDK内部会基于此信息计算Video的旋转角度
|
|
117
|
+
*/
|
|
118
|
+
setVideoRenderer(rosterId: string, viewId: string): void;
|
|
119
|
+
/**
|
|
120
|
+
* 绑定多路视频容器信息,SDK接管并播放视频流
|
|
121
|
+
* 使用场景:将某一路参会者画面渲染到自定义的容器中,即可调用此方法将画面重复渲染到指定的ViewId容器中;
|
|
122
|
+
* 支持将画面流绑定到多个画面容器中渲染
|
|
123
|
+
*
|
|
124
|
+
* @param { string } rosterId - 参会者唯一ID,由endpointId + mediagroupId组成;
|
|
125
|
+
* @param { string } viewId 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
|
|
126
|
+
*/
|
|
127
|
+
setSlaveVideoRenderer(rosterId: string, viewId: string): import("../../type/base").IReturnResult | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* videoManagers 移除key对应的元素
|
|
130
|
+
*
|
|
131
|
+
* @param { string } rosterId - 参会者唯一ID,由endpointId + mediagroupId组成;
|
|
132
|
+
* @param { string } viewId - 包裹Video元素的容器节点ID
|
|
133
|
+
*/
|
|
134
|
+
removeVideoRenderer(rosterId: string): void;
|
|
135
|
+
/**
|
|
136
|
+
* 【副屏渲染】移除副屏渲染信息
|
|
137
|
+
* 如果rosterId和viewId没有填写,则清空所有的副屏渲染配置数据
|
|
138
|
+
*
|
|
139
|
+
* @param { string } rosterId - 参会者唯一ID,由endpointId + mediagroupId组成;如果没有传递,则清空所有数据
|
|
140
|
+
* @param { string } viewId 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
|
|
141
|
+
*/
|
|
142
|
+
removeSlaveVideoRenderer(rosterId?: string, viewId?: string): void;
|
|
143
|
+
/**
|
|
144
|
+
* 播放本地画面
|
|
145
|
+
*/
|
|
146
|
+
playLocalVideo(): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* 播放对应画面
|
|
149
|
+
*
|
|
150
|
+
* @param { string[] ? } rosterIdList - 指定重新播放的参会者ID,由roster中的id得到
|
|
151
|
+
*/
|
|
152
|
+
playVideo(rosterIdList?: string[]): Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
* 切换布局方向
|
|
155
|
+
*
|
|
156
|
+
* @param { LayoutOrientationType } layoutOrientation - 布局方向: MOBILE_HORIZONTAL-横屏;MOBILE_VERTICAL-竖屏
|
|
157
|
+
*/
|
|
158
|
+
setLayoutOrientation(layoutOrientation: LayoutOrientationType): void;
|
|
159
|
+
/**
|
|
160
|
+
* [AUTO] 切换布局
|
|
161
|
+
*
|
|
162
|
+
* @param { IMode } templateMode - 指定要切换的布局模式
|
|
163
|
+
* @returns { Promise<IMode> } - 切换后的布局模式
|
|
164
|
+
*/
|
|
165
|
+
switchLayout(templateMode?: IMode): "SPEAKER" | "GALLERY" | "MULTI_PIC_CONTENT_HIGH_PRIORITY" | "MULTI_PIC_ACTIVE_HIGH_PRIORITY" | "TWO_PIC_PIP" | "CONTENT_ONLY" | "TWO_PIC_SYMMETRIC";
|
|
166
|
+
/**
|
|
167
|
+
* 切换主画面, GALLERY布局不支持
|
|
168
|
+
*
|
|
169
|
+
* @param { string } rosterId - 参会者唯一ID,由roster中的id得到
|
|
170
|
+
* @returns { string } rosterId
|
|
171
|
+
*/
|
|
172
|
+
setFocusView(rosterId: string): string;
|
|
173
|
+
/**
|
|
174
|
+
* 设置本地视频渲染参数
|
|
175
|
+
*
|
|
176
|
+
* @param { LocalViewParams } params - 本地视频渲染参数
|
|
177
|
+
* @property { boolean } params.isMirror - 是否镜像展示
|
|
178
|
+
*/
|
|
179
|
+
setLocalViewParams(params: LocalViewParams): Promise<void>;
|
|
180
|
+
/**
|
|
181
|
+
* 更新Local video track
|
|
182
|
+
*/
|
|
183
|
+
updateLocalTrack(): void;
|
|
184
|
+
/**
|
|
185
|
+
* [AUTO] 重新计算页码信息、模板类型
|
|
186
|
+
*
|
|
187
|
+
* @param { IConfInfo } confInfo - confChange信息
|
|
188
|
+
*/
|
|
189
|
+
calcPageInfo(confInfo?: IConfInfo): void;
|
|
190
|
+
/**
|
|
191
|
+
* [AUTO] 请流
|
|
192
|
+
*
|
|
193
|
+
* @param { IPageInfo } pageInfo - 页码信息
|
|
194
|
+
*/
|
|
195
|
+
calcRequestNewLayout(pageInfo?: IPageInfo): void;
|
|
196
|
+
/**
|
|
197
|
+
* [AUTO] 设置模版类型
|
|
198
|
+
*
|
|
199
|
+
* @param { boolean } isReset - 是否重置模版
|
|
200
|
+
*/
|
|
201
|
+
setTemplateMode(isReset?: boolean): void;
|
|
202
|
+
/**
|
|
203
|
+
* 重置templateMode
|
|
204
|
+
* 本地共享,则显示对称布局四画面
|
|
205
|
+
* 本地未共享,根据当前是否有content,显示默认布局
|
|
206
|
+
*/
|
|
207
|
+
private resetTemplateMode;
|
|
208
|
+
/**
|
|
209
|
+
* 创建排好序的roster数据
|
|
210
|
+
*
|
|
211
|
+
* @param { ILayoutRoster[] } totalLayoutResultList - layout数据
|
|
212
|
+
*/
|
|
213
|
+
private createOrderRoster;
|
|
214
|
+
/**
|
|
215
|
+
* [CUSTOM] 基于 new layout result 消息生成 customLayoutMap 数据,并diff对比更新数据
|
|
216
|
+
*
|
|
217
|
+
* @param { ILayoutRoster[] } totalLayoutResultList - layout数据
|
|
218
|
+
*/
|
|
219
|
+
createCustomLayout(totalLayoutResultList: ILayoutRoster[]): void;
|
|
220
|
+
/**
|
|
221
|
+
* [AUTO] : 基于 new layout result 消息生成 customLayoutMap 数据,并diff对比更新数据
|
|
222
|
+
*
|
|
223
|
+
* @param { ILayoutRoster[] } totalLayoutResultList - layout数据
|
|
224
|
+
*/
|
|
225
|
+
createAutoLayout(totalLayoutResultList: ILayoutRoster[]): void;
|
|
226
|
+
/**
|
|
227
|
+
* 创建Layout
|
|
228
|
+
*/
|
|
229
|
+
createLayout(): void;
|
|
230
|
+
/**
|
|
231
|
+
* roster 排序
|
|
232
|
+
*/
|
|
233
|
+
calculateOrderRosterList(): IRoster[];
|
|
234
|
+
/**
|
|
235
|
+
* 缓存主画面信息
|
|
236
|
+
*
|
|
237
|
+
* @param { string } rosterId - 参会者唯一ID,由roster中的id得到
|
|
238
|
+
*/
|
|
239
|
+
private handleFocusViewConfig;
|
|
240
|
+
/**
|
|
241
|
+
* 计算 custom layout 数据
|
|
242
|
+
*/
|
|
243
|
+
private customLayoutCalculator;
|
|
244
|
+
/**
|
|
245
|
+
* [AUTO] 1. 初始化Layout数据
|
|
246
|
+
*/
|
|
247
|
+
initLayoutManager(): void;
|
|
248
|
+
/**
|
|
249
|
+
* 计算显示模板数据
|
|
250
|
+
*
|
|
251
|
+
* @param { number } currentCount - 模版画面数量
|
|
252
|
+
* @param { TemplateType } templateType 是否是全屏模版
|
|
253
|
+
*/
|
|
254
|
+
private calcTemplate;
|
|
255
|
+
/**
|
|
256
|
+
* 根据模版匹配roster信息,生产newLayout数据
|
|
257
|
+
*/
|
|
258
|
+
calculateNewLayoutList(): ILayout[];
|
|
259
|
+
/**
|
|
260
|
+
* 计算Layout Container的容器信息
|
|
261
|
+
*/
|
|
262
|
+
calculateScreenInfo(): void;
|
|
263
|
+
/**
|
|
264
|
+
* 计算Layout Container的容器信息
|
|
265
|
+
*
|
|
266
|
+
* @param { number } rate - 容器比例
|
|
267
|
+
* @returns { IScreenInfo } screenInfo
|
|
268
|
+
*/
|
|
269
|
+
private getTemplateScreenInfo;
|
|
270
|
+
/**
|
|
271
|
+
* [AUTO] 2.创建LayoutMap, 移除无效Layout
|
|
272
|
+
*/
|
|
273
|
+
private createBaseLayout;
|
|
274
|
+
/**
|
|
275
|
+
* 根据配置,获取roster头像
|
|
276
|
+
*
|
|
277
|
+
* @param { IRoster } roster - 参会者信息
|
|
278
|
+
* @param { LayoutAvatarType } type - 头像类型
|
|
279
|
+
*/
|
|
280
|
+
private getLayoutAvatar;
|
|
281
|
+
/**
|
|
282
|
+
* 清理无效的 layout 数据,重置状态
|
|
283
|
+
*/
|
|
284
|
+
private clearInvalidLayout;
|
|
285
|
+
/**
|
|
286
|
+
* [AUTO | CUSTOM] 使用最新的 videoTrackList 和 layoutResults 数据更新 layout 内容
|
|
287
|
+
*
|
|
288
|
+
* @param { boolean } isAutoSendLayout - 是否上报Layout信息
|
|
289
|
+
*/
|
|
290
|
+
updateStreams(isAutoSendLayout?: boolean): void;
|
|
291
|
+
/**
|
|
292
|
+
* 清理失效的 video manager 数据
|
|
293
|
+
*/
|
|
294
|
+
clearInvalidVideoManagers(): void;
|
|
295
|
+
private getVideoStreamByTrackId;
|
|
296
|
+
/**
|
|
297
|
+
* [AUTO] 计算位置信息
|
|
298
|
+
*/
|
|
299
|
+
calculatePosition(): void;
|
|
300
|
+
/**
|
|
301
|
+
* 计算位置信息
|
|
302
|
+
*
|
|
303
|
+
* @param { ILayout } item - 需要计算位置信息的layout信息
|
|
304
|
+
* @param { IScreenInfo } screenInfo
|
|
305
|
+
* @returns
|
|
306
|
+
*/
|
|
307
|
+
private getTemplatePosition;
|
|
308
|
+
/**
|
|
309
|
+
* [AUTO] 计算旋转信息
|
|
310
|
+
*/
|
|
311
|
+
calculateRotate(): void;
|
|
312
|
+
/**
|
|
313
|
+
* [CUSTOM_LAYOUT] 合并自定义布局旋转信息
|
|
314
|
+
*
|
|
315
|
+
* @public
|
|
316
|
+
*/
|
|
317
|
+
calculateCustomLayoutRotate(): void;
|
|
318
|
+
/**
|
|
319
|
+
* 通过rotationId获取Layout数据
|
|
320
|
+
*
|
|
321
|
+
* @param { string } rotationId - rotationId,由RotationInfo信息中的participantId + mediagroupid组合
|
|
322
|
+
* @returns { ILayout | null }
|
|
323
|
+
*/
|
|
324
|
+
private getLayoutByRotationId;
|
|
325
|
+
/**
|
|
326
|
+
* 【内部方法】停止轮询时,清理无效的 videoManager 数据
|
|
327
|
+
*
|
|
328
|
+
* @param monitoryList callUri list 数据
|
|
329
|
+
*/
|
|
330
|
+
clearVideoManagersUseMonitorList(monitoryList: string[]): void;
|
|
331
|
+
/**
|
|
332
|
+
* 通过旋转信息获取在layout中的位置
|
|
333
|
+
*
|
|
334
|
+
* @param pid peopleId
|
|
335
|
+
* @param mediagroupid type
|
|
336
|
+
*/
|
|
337
|
+
private getLayoutKeyByRotateInfo;
|
|
338
|
+
/**
|
|
339
|
+
* 获取最终请流分辨率
|
|
340
|
+
* 1. 根据是否启用低性能模式
|
|
341
|
+
* 2. 根据企业配置转换请流分辨率
|
|
342
|
+
*
|
|
343
|
+
* @param { ITemplateResolution } resolution - layout模版分辨率
|
|
344
|
+
* @returns { resolutionLevel }
|
|
345
|
+
*/
|
|
346
|
+
private convertResolutionLevel;
|
|
347
|
+
/**
|
|
348
|
+
* 是否是主会场模式(远端设置为主会场)
|
|
349
|
+
*
|
|
350
|
+
* @returns
|
|
351
|
+
*/
|
|
352
|
+
private isChairmanMode;
|
|
353
|
+
/**
|
|
354
|
+
* 镜像显示Local画面
|
|
355
|
+
*/
|
|
356
|
+
private localMirrorRotate;
|
|
357
|
+
/**
|
|
358
|
+
* [AUTO] 全屏请流
|
|
359
|
+
*/
|
|
360
|
+
private calcForceFullScreenRequestLayout;
|
|
361
|
+
/**
|
|
362
|
+
* 退出全屏
|
|
363
|
+
*/
|
|
364
|
+
private exitFullScreen;
|
|
365
|
+
/**
|
|
366
|
+
* 查找对应的roster
|
|
367
|
+
*
|
|
368
|
+
* @param { string } rosterId - 参会者唯一ID,由roster中的id得到
|
|
369
|
+
* @param { ILayoutRoster[]} list - layout list
|
|
370
|
+
* @returns
|
|
371
|
+
*/
|
|
372
|
+
private findRosterById;
|
|
373
|
+
/**
|
|
374
|
+
* 销毁LayoutManager资源
|
|
375
|
+
*/
|
|
376
|
+
destroy(): void;
|
|
377
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { TemplateInfo, TemplateParams } from '../../type';
|
|
2
|
+
declare class TemplateManager {
|
|
3
|
+
private templates;
|
|
4
|
+
private commonTemplates;
|
|
5
|
+
private contentTemplates;
|
|
6
|
+
constructor();
|
|
7
|
+
/**
|
|
8
|
+
* 获取对应的模版
|
|
9
|
+
*
|
|
10
|
+
* @param { TemplateMode } modeType 模版类型
|
|
11
|
+
* @param { number } currentCount 画面数量
|
|
12
|
+
* @param { number } participantCount 会议总人数
|
|
13
|
+
* @param { boolean } isLocalHide 是否隐藏Local, 默认:false
|
|
14
|
+
* @param { boolean } isChairmanMode 是否有主会场, 默认:false
|
|
15
|
+
* @param { TemplateType } templateType 全屏画面类型
|
|
16
|
+
* @param { LayoutOrientationType } orientation 移动端方向,默认 'NONE':PC端
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
getTemplate({ modeType, currentCount, participantCount, isLocalHide, isChairmanMode, templateType, orientation, focusViewConfig }: TemplateParams): TemplateInfo;
|
|
20
|
+
/**
|
|
21
|
+
* 处理指定的主画面模版信息
|
|
22
|
+
*
|
|
23
|
+
* @param { ITemplateObj[] } newTemplate 模版信息
|
|
24
|
+
* @param { FocusViewConfig } focusViewConfig 指定的主画面的信息
|
|
25
|
+
*/
|
|
26
|
+
private handleForceView;
|
|
27
|
+
/**
|
|
28
|
+
* 获取不同平台,不同方向 对应的所有模版类型数据
|
|
29
|
+
*
|
|
30
|
+
* @param { LayoutOrientationType } orientation
|
|
31
|
+
* @returns { ITemplate }
|
|
32
|
+
*/
|
|
33
|
+
private getAllTemplates;
|
|
34
|
+
/**
|
|
35
|
+
* 初始化content模版数据
|
|
36
|
+
*/
|
|
37
|
+
private getContentTemplates;
|
|
38
|
+
/**
|
|
39
|
+
* 初始化 移动端 模版数据
|
|
40
|
+
*/
|
|
41
|
+
private getMobileTemplates;
|
|
42
|
+
/**
|
|
43
|
+
* 获取全屏模版
|
|
44
|
+
*
|
|
45
|
+
* @param { TemplateType } type - 全屏对象的类型, PEOPLE/CONTENT等
|
|
46
|
+
* @returns { TemplateInfo }
|
|
47
|
+
*/
|
|
48
|
+
private getFullLayoutTemplate;
|
|
49
|
+
/**
|
|
50
|
+
* [content]缩略视图: 和演讲者布局一样,但是主画面显示content,分辨率请1080P
|
|
51
|
+
*
|
|
52
|
+
* @param { TemplateInfos } template
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
private getMultiPicContentHighPriority;
|
|
56
|
+
/**
|
|
57
|
+
* [content] 缩略共享: 和演讲者布局一样, 但是左列第二画面小窗口显示content, 分辨率请720P
|
|
58
|
+
*
|
|
59
|
+
* @param { TemplateInfos } template
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
private getMultiPicActiveHighPriority;
|
|
63
|
+
}
|
|
64
|
+
export default TemplateManager;
|
package/lib/main/meeting.d.ts
CHANGED
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
* Meeting Info Control
|
|
3
3
|
*
|
|
4
4
|
* Created at : 2022-10-27 13:58:22
|
|
5
|
-
* Last modified : 2023-
|
|
5
|
+
* Last modified : 2023-11-03 11:46:29
|
|
6
6
|
*/
|
|
7
|
-
import { IRecordPermission, IConfMgmtUrl, ILayout, IMediaConfig, IReqInfo, LayoutAvatarType, TLayoutMap, InviteInfo } from '../type';
|
|
7
|
+
import { IRecordPermission, IExportUserInfo, IConfMgmtUrl, ILayout, IMediaConfig, IReqInfo, LayoutAvatarType, TLayoutMap, InviteInfo, MEETING_DIRECTION } from '../type';
|
|
8
8
|
import Client from './client';
|
|
9
|
-
import Logger from '../tools/logger';
|
|
10
9
|
declare class Meeting {
|
|
11
10
|
private client;
|
|
12
11
|
private logger;
|
|
12
|
+
private action;
|
|
13
13
|
private conferenceInfo;
|
|
14
14
|
private recordPermission;
|
|
15
15
|
private cloudRoomInfo;
|
|
16
16
|
private confMgmtUrl;
|
|
17
17
|
private layoutImageAvatarMap;
|
|
18
18
|
private mediaConfig;
|
|
19
|
-
private rxBandwidth;
|
|
20
19
|
private enterpriseConfig;
|
|
21
|
-
|
|
20
|
+
private userInfo;
|
|
21
|
+
constructor(client: Client);
|
|
22
22
|
getRecordPermission(): IRecordPermission;
|
|
23
23
|
getLayoutImageAvatarMap(): Map<string, {
|
|
24
24
|
url: string;
|
|
25
25
|
isCustom: boolean;
|
|
26
26
|
}>;
|
|
27
27
|
getEnterpriseMediaConfig(): IMediaConfig;
|
|
28
|
-
|
|
28
|
+
getUserInfo(): IExportUserInfo | null;
|
|
29
29
|
getLayoutAvatarType(): LayoutAvatarType;
|
|
30
30
|
/**
|
|
31
31
|
* 登录用户信息和个人云会议室信息
|
|
@@ -37,7 +37,13 @@ declare class Meeting {
|
|
|
37
37
|
*
|
|
38
38
|
* @public
|
|
39
39
|
*/
|
|
40
|
-
handleConferenceInfo(): Promise<void>;
|
|
40
|
+
handleConferenceInfo(properties?: {}): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* 更新并上报会议室信息
|
|
43
|
+
*
|
|
44
|
+
* @param { Object } properties - 会议室信息
|
|
45
|
+
*/
|
|
46
|
+
updateConferenceInfo(properties?: {}): void;
|
|
41
47
|
/**
|
|
42
48
|
* 获取会控相关地址
|
|
43
49
|
*
|
|
@@ -69,30 +75,16 @@ declare class Meeting {
|
|
|
69
75
|
*
|
|
70
76
|
* 硬终端设备,无论oms配置什么,都使用对应的人物图标
|
|
71
77
|
*
|
|
72
|
-
* @param { ILayout } layout 参会者Layout
|
|
73
|
-
* @param {string}
|
|
74
|
-
* @returns
|
|
78
|
+
* @param { ILayout } layout - 参会者Layout
|
|
79
|
+
* @param { string } rosterId - 参会者唯一id
|
|
75
80
|
*/
|
|
76
|
-
setLayoutAvatar(layout: ILayout,
|
|
81
|
+
setLayoutAvatar(layout: ILayout, rosterId: string): void;
|
|
77
82
|
/**
|
|
78
83
|
* 处理layout图像
|
|
79
84
|
*
|
|
80
85
|
* @param { TLayoutMap } layoutListMap
|
|
81
86
|
*/
|
|
82
87
|
handleLayoutAvatar(layoutListMap: TLayoutMap): Promise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* 获取企业配置信息
|
|
85
|
-
* 1. 企业管理平台带宽配置
|
|
86
|
-
* 2. Web端请1080P能力
|
|
87
|
-
*/
|
|
88
|
-
setEnterpriseConfig(): Promise<void>;
|
|
89
|
-
/**
|
|
90
|
-
* 根据企业配置媒体能力,得到最终的请流参数
|
|
91
|
-
*
|
|
92
|
-
* @param {IReqInfo[]} reqInfoList 请流列表数据
|
|
93
|
-
* @returns {IReqInfo[]}
|
|
94
|
-
*/
|
|
95
|
-
convertReqList(reqInfoList: IReqInfo[]): IReqInfo[];
|
|
96
88
|
/**
|
|
97
89
|
* 获取详细的会控地址
|
|
98
90
|
*
|
|
@@ -128,13 +120,20 @@ declare class Meeting {
|
|
|
128
120
|
* 1. 企业管理平台带宽配置
|
|
129
121
|
* 2. Web端请1080P能力配置
|
|
130
122
|
*/
|
|
131
|
-
|
|
123
|
+
setEnterpriseMediaConfig(): Promise<void>;
|
|
124
|
+
/**
|
|
125
|
+
* 配置上行分辨率配置
|
|
126
|
+
*
|
|
127
|
+
* @param { MEETING_DIRECTION } direction - 配置上下行方向配置
|
|
128
|
+
*/
|
|
129
|
+
processMediaConfig(direction: MEETING_DIRECTION): void;
|
|
132
130
|
/**
|
|
133
131
|
* 企业配置信息
|
|
134
132
|
*
|
|
135
133
|
* 1. 头像配置
|
|
134
|
+
* 2. 禁用语音转写英文翻译
|
|
136
135
|
*/
|
|
137
|
-
|
|
136
|
+
setEnterpriseBuffetConfig(): Promise<void>;
|
|
138
137
|
/**
|
|
139
138
|
* 处理信令下发的等候室
|
|
140
139
|
*
|
|
@@ -149,5 +148,12 @@ declare class Meeting {
|
|
|
149
148
|
* @returns { ILayout[] }
|
|
150
149
|
*/
|
|
151
150
|
private getUnAvatarList;
|
|
151
|
+
/**
|
|
152
|
+
* 根据企业配置媒体能力,得到最终的请流参数
|
|
153
|
+
*
|
|
154
|
+
* @param {IReqInfo[]} reqInfoList 请流列表数据
|
|
155
|
+
* @returns {IReqInfo[]}
|
|
156
|
+
*/
|
|
157
|
+
convertReqList(reqInfoList: IReqInfo[]): IReqInfo[];
|
|
152
158
|
}
|
|
153
159
|
export default Meeting;
|
package/lib/main/peer.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { IInvite, IStreamSender, ICandidate, PushType, ISenderMap } from '../type';
|
|
8
8
|
import Client from './client';
|
|
9
|
-
import Logger from '../tools/logger';
|
|
9
|
+
import Logger from '../tools/log/logger';
|
|
10
10
|
import Stream from './stream';
|
|
11
11
|
/**
|
|
12
12
|
* Peer模块,用于管理 P2P 连接和内部事件
|
|
@@ -33,6 +33,7 @@ export default class Peer {
|
|
|
33
33
|
private videoCodecs;
|
|
34
34
|
private audioCodecs;
|
|
35
35
|
private qualityWorker;
|
|
36
|
+
private localIPAddress;
|
|
36
37
|
constructor(client: Client, stream: Stream);
|
|
37
38
|
private initQualityWorker;
|
|
38
39
|
restart(): void;
|
|
@@ -130,6 +131,7 @@ export default class Peer {
|
|
|
130
131
|
*/
|
|
131
132
|
private onHandleConnectionStateChange;
|
|
132
133
|
onHandleIcecandidateerror(e: Event): void;
|
|
134
|
+
private onHandleIcecandidate;
|
|
133
135
|
/**
|
|
134
136
|
* 重连PeerConnection
|
|
135
137
|
*
|