@xylink/xy-rtc-sdk 3.9.1-beta.6 → 3.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylink/xy-rtc-sdk",
3
- "version": "3.9.1-beta.6",
3
+ "version": "3.9.3",
4
4
  "description": "XYLink RTC SDK(小鱼易连WebRTC SDK)",
5
5
  "keywords": [
6
6
  "XYLink RTC SDK",
@@ -57,6 +57,7 @@
57
57
  "html-webpack-plugin": "^5.5.0",
58
58
  "husky": "^4.3.8",
59
59
  "jest": "^25.1.0",
60
+ "js-sha512": "^0.8.0",
60
61
  "jszip": "^3.5.0",
61
62
  "less": "^4.1.3",
62
63
  "less-loader": "^11.0.0",
@@ -1,244 +0,0 @@
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-06-16 16:53:23
10
- */
11
- import Logger from '../tools/logger';
12
- import { ILayout, IVideoRenders, IRoster, ITemplateObj, IScreenInfo, IMode, IOutputCustomLayout, ILayoutRoster, IConfInfo, IPageInfo, IReqInfo, VideoQuality, StreamResolutionLevel, TLayoutMap } 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 originOrderRosters;
21
- private orderRosterList;
22
- private selfRoster;
23
- private newLayoutList;
24
- private initLayout;
25
- private templateMode;
26
- private templateModeTemp;
27
- private templateRate;
28
- private content;
29
- private screenInfo;
30
- private internalsLayout;
31
- private forceFullScreenId;
32
- private localContent;
33
- private preConfInfo;
34
- private confInfo;
35
- private pageInfo;
36
- private isLocalShareContent;
37
- constructor(client: Client);
38
- static getCustomLayoutItem(item: ILayout, resolution: StreamResolutionLevel, quality: VideoQuality): {
39
- pid: number;
40
- resolution: StreamResolutionLevel;
41
- quality: VideoQuality;
42
- mediagroupid: number;
43
- };
44
- getNewLayout(): ILayout[];
45
- getOrderRosterList(): IRoster[];
46
- getOriginOrderRosters(): IRoster[];
47
- getLayoutMap(): TLayoutMap;
48
- getCustomLayoutMap(): TLayoutMap;
49
- getTemplateRate(): {
50
- previous: number;
51
- next: number;
52
- };
53
- getContentRosterItem(): IRoster | null;
54
- getSelfRoster(): IRoster;
55
- getScreenInfo(): IScreenInfo;
56
- getVideoManagers(): IVideoRenders;
57
- getForceFullScreenId(): string;
58
- getTemplateMode(): IMode;
59
- getConfInfo(): IConfInfo;
60
- getInternalsLayout(): IOutputCustomLayout;
61
- getLocalShareState(): boolean;
62
- setOrderRosterList(orderRosterList: IRoster[]): void;
63
- setOriginOrderRosters(originOrderRosters: IRoster[]): void;
64
- /**
65
- * 设置发布全屏layout id
66
- *
67
- * @param { string } id forceLayout roster id
68
- */
69
- setForceFullScreenId(id?: string): void;
70
- setContentRosterItem(content: IRoster | null): void;
71
- setConfInfo(confInfo: IConfInfo): void;
72
- /**
73
- * 本地分享content, 设置对应布局、页码
74
- *
75
- * @public
76
- * @param { boolean } is 本地是否分享content
77
- */
78
- setLocalShareContent(is: boolean): void;
79
- /**
80
- * 计算显示模板数据
81
- *
82
- * @public
83
- * @returns
84
- */
85
- calcTemplate(): {
86
- tempLayout: ITemplateObj[];
87
- templateRate: number;
88
- };
89
- initLayoutManager(): void;
90
- /**
91
- * 回调 video 状态
92
- *
93
- * @param key endpointId + mediagroupId 组成的id
94
- * @param data 最新的会议状态 status === video track / video标签 监听到的状态
95
- *
96
- * state === roster 当前状态 + 上一次的status
97
- */
98
- private onVideoStatusChange;
99
- /**
100
- * 使用wrap element元素更新 videoManagers 数据,并绑定视频流信息
101
- *
102
- * @param key endpointId + mediagroupId 组成的id
103
- * @param wrapEleId wrap video element id
104
- */
105
- setVideoRenderer(key: string, wrapEleId: string): void;
106
- removeVideoRenderer(key: string, wrapEleId: string): void;
107
- playLocalVideo(): Promise<void>;
108
- playVideo(keys?: string[]): Promise<void>;
109
- updateLocalTrack(): void;
110
- /**
111
- * 使用最新的 videoTrackList 和 layoutResults 数据更新 layout 内容
112
- */
113
- updateStreams(isAutoSendLayout?: boolean): void;
114
- /**
115
- * 清理失效的 video manager 数据
116
- */
117
- clearInvalidVideoManagers(): void;
118
- /**
119
- * [AUTO] 重新计算页码信息、模板类型
120
- *
121
- * @public
122
- */
123
- calcPageInfo(confInfo?: IConfInfo): void;
124
- /**
125
- * [AUTO] 分页
126
- *
127
- * @public
128
- * @param { number } currentPage 请求某一页数据
129
- */
130
- setPageInfo(currentPage?: number): void;
131
- /**
132
- * [AUTO] 全屏请流
133
- *
134
- * @public
135
- */
136
- calcForceFullScreenRequestLayout(): void;
137
- /**
138
- * [AUTO] 请流
139
- *
140
- * @public
141
- * @param { IPageInfo } pageInfo 页码信息
142
- */
143
- calcRequestNewLayout(pageInfo?: IPageInfo): void;
144
- /**
145
- * [AUTO] : 基于 new layout result 消息生成 customLayoutMap 数据,并diff对比更新数据
146
- *
147
- * @public
148
- * @param { ILayoutRoster[] } totalLayoutResultList
149
- */
150
- createAutoLayout(totalLayoutResultList: ILayoutRoster[]): void;
151
- /**
152
- * 重置templateMode
153
- * 本地共享,则显示对称布局四画面
154
- * 本地未共享,根据当前是否有content,显示默认布局
155
- */
156
- private resetTemplateMode;
157
- /**
158
- * 创建排好序的roster数据
159
- *
160
- * @private
161
- * @param { ILayoutRoster[] } totalLayoutResultList
162
- */
163
- private createOrderRoster;
164
- createCustomLayout(totalLayoutResultList: ILayoutRoster[]): void;
165
- /**
166
- * 根据 reqList 计算最新的 layout 数据(2.0.2以前的版本方法)
167
- *
168
- * @param reqList
169
- */
170
- requestLayout(reqList: IReqInfo[]): void;
171
- calculatePosition(): void;
172
- calculateRotate(): void;
173
- getVideoStreamByTrackId(videoTrackId: string): {
174
- videoStream: MediaStream | null;
175
- track: MediaStreamTrack | null;
176
- };
177
- calculateNewLayoutList(): {
178
- roster: IRoster;
179
- position: number[];
180
- zIndex: number;
181
- }[];
182
- calculateScreenInfo(): {
183
- width: number;
184
- height: number;
185
- rateHeight: number;
186
- rateWidth: number;
187
- } | undefined;
188
- createLayout(): void;
189
- calculateOrderRosterList(): IRoster[];
190
- /**
191
- * [auto] 切换布局
192
- *
193
- * @param { IMode } templateMode 指定要切换的布局模式
194
- * @returns { Promise<IMode> } 切换后的布局模式
195
- */
196
- switchLayout(templateMode?: IMode): IMode;
197
- /**
198
- * 【内部方法】停止轮询时,清理无效的 videoManager 数据
199
- *
200
- * @param monitoryList callUri list 数据
201
- */
202
- clearVideoManagersUseMonitorList(monitoryList: string[]): void;
203
- /**
204
- * 维护 Local roster 状态
205
- * @param data
206
- */
207
- setLocalStatus(data: any): void;
208
- /**
209
- * 清理无效的 layout 数据,重置状态
210
- */
211
- private clearInvalidLayout;
212
- private createBaseLayout;
213
- /**
214
- * 计算 custom layout 数据
215
- */
216
- private customLayoutCalculator;
217
- /**
218
- * 通过旋转信息获取在layout中的位置
219
- *
220
- * @param pid peopleId
221
- * @param mediagroupid type
222
- */
223
- private getLayoutKeyByRotateInfo;
224
- /**
225
- * 镜像显示Local画面
226
- */
227
- private localMirrorRotate;
228
- /**
229
- * 根据layout名称 获得 对应的 名称头像
230
- *
231
- * @param { string } displayName layout名称
232
- * @returns { string } 名称头像 文字内容
233
- */
234
- private getLayoutTextAvatar;
235
- /**
236
- * 获取最终请流分辨率
237
- * 1. 根据是否启用低性能模式
238
- * 2. 根据企业配置转换请流分辨率
239
- *
240
- * @param { ITemplateResolution } resolution - layout模版分辨率
241
- * @returns { resolutionLevel }
242
- */
243
- private convertResolutionLevel;
244
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * Meeting layout init template data
3
- *
4
- * @authors Luo-jinghui (luojinghui424@gmail.com)
5
- * @date 2019-10-24 20:41:38
6
- */
7
- import { ITypeTemplate, ITemplate, TemplateType, ITemplateObj } from '../type';
8
- export declare const RATE = 0.5625;
9
- export declare const HIDE_POSITION: number[];
10
- export declare const SPEAKER_TEMPLATE: ITypeTemplate;
11
- export declare const GALLERY_TEMPLATE: ITypeTemplate;
12
- export declare const COMMON_TEMPLATE: ITemplate;
13
- export declare const CONTENT_TEMPLATE: ITemplate;
14
- export declare const TEMPLATE: ITemplate;
15
- /**
16
- * forceLayout模版
17
- *
18
- * @param { TemplateType } type - 模版类型
19
- * @returns
20
- */
21
- export declare const FORCE_LAYOUT_TEMPLATE: (type: TemplateType) => ITemplateObj;