@xylink/xy-rtc-sdk 2.0.6 → 2.1.0
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/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/lib/src/action/index.d.ts +37 -11
- package/lib/src/enum/contraints.d.ts +217 -0
- package/lib/src/enum/errorCode.d.ts +874 -0
- package/lib/src/enum/index.d.ts +6 -185
- package/lib/src/main/client.d.ts +73 -28
- package/lib/src/main/layoutManager.d.ts +45 -18
- package/lib/src/main/peer.d.ts +3 -0
- package/lib/src/main/stream.d.ts +15 -1
- package/lib/src/tools/browser.d.ts +0 -1
- package/lib/src/tools/config.d.ts +1 -1
- package/lib/src/tools/httpClient.d.ts +15 -2
- package/lib/src/tools/socket.d.ts +1 -1
- package/lib/src/tools/utils.d.ts +13 -0
- package/lib/src/tools/verify.d.ts +7 -0
- package/lib/src/type/base.d.ts +8 -5
- package/lib/src/type/client.d.ts +61 -11
- package/lib/src/type/stream.d.ts +29 -2
- package/package.json +5 -3
package/lib/src/enum/index.d.ts
CHANGED
|
@@ -4,203 +4,24 @@
|
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-10-30 14:12:52
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { IDefault, IMUTE_MAP, ITemplateMode, IContentTemplateMode, IRoster } from '../type';
|
|
8
|
+
export * from './contraints';
|
|
8
9
|
export declare const DETECT_LOCATOR_SERVER_NAME = "WebrtcSigGW";
|
|
10
|
+
export declare const MIME_TYPE = "video/H264";
|
|
9
11
|
export declare const DEVICE_TYPE = 17;
|
|
10
12
|
export declare const SELF_MOCK_PID = 9999999999;
|
|
11
13
|
export declare const STREAM_CHANNEL_COUNT = 11;
|
|
12
14
|
export declare const MAX_PARTICIPANT_COUNT = 112;
|
|
13
15
|
export declare const STREAM_ERROR_CODE_MAP: string[];
|
|
14
16
|
export declare const SUPPORT_DEVICE_TYPE: string[];
|
|
17
|
+
export declare const MEDIAGROUPID: number[];
|
|
18
|
+
export declare const QUALITY_TYPE: number[];
|
|
19
|
+
export declare const RESOLUTION_TYPE: number[];
|
|
15
20
|
export declare const MAX_PAGE_SIZE = 9;
|
|
16
21
|
export declare const NETWORK_TYPE_MAP: {
|
|
17
22
|
[key: string]: number;
|
|
18
23
|
};
|
|
19
24
|
export declare const MUTE_MAP: IMUTE_MAP;
|
|
20
|
-
export declare const CONTRAINTS_MAP: {
|
|
21
|
-
0: number[];
|
|
22
|
-
1: number[];
|
|
23
|
-
2: number[];
|
|
24
|
-
3: number[];
|
|
25
|
-
4: number[];
|
|
26
|
-
5: number[];
|
|
27
|
-
11: number[];
|
|
28
|
-
12: number[];
|
|
29
|
-
};
|
|
30
|
-
export declare const BASE_RESOLUTION_CONTRAINTS: {
|
|
31
|
-
width: {
|
|
32
|
-
min: number;
|
|
33
|
-
ideal: number;
|
|
34
|
-
};
|
|
35
|
-
height: {
|
|
36
|
-
min: number;
|
|
37
|
-
ideal: number;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export declare const RESOLUTION_360_CONTRAINTS: {
|
|
41
|
-
width: number;
|
|
42
|
-
height: number;
|
|
43
|
-
};
|
|
44
|
-
export declare const BASE_CONTRAINTS: IBASE_CONTRAINTS;
|
|
45
|
-
export declare const CONTENT_BASE_CONTRAINTS: ICONTENT_CONTRAINTS;
|
|
46
|
-
export declare const FIREFOX_CONTENT_CONTRAINTS: {
|
|
47
|
-
'720': {
|
|
48
|
-
min: {
|
|
49
|
-
frameRate: number;
|
|
50
|
-
width: number;
|
|
51
|
-
height: number;
|
|
52
|
-
cursor: string;
|
|
53
|
-
aspectRatio: number;
|
|
54
|
-
resizeMode: "crop-and-scale";
|
|
55
|
-
logicalSurface: true;
|
|
56
|
-
};
|
|
57
|
-
max: {
|
|
58
|
-
width: number;
|
|
59
|
-
height: number;
|
|
60
|
-
cursor: string;
|
|
61
|
-
aspectRatio: number;
|
|
62
|
-
resizeMode: "crop-and-scale";
|
|
63
|
-
frameRate: ConstrainDouble;
|
|
64
|
-
logicalSurface: true;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
'1080': {
|
|
68
|
-
min: {
|
|
69
|
-
frameRate: number;
|
|
70
|
-
width: number;
|
|
71
|
-
height: number;
|
|
72
|
-
cursor: string;
|
|
73
|
-
aspectRatio: number;
|
|
74
|
-
resizeMode: "crop-and-scale";
|
|
75
|
-
logicalSurface: true;
|
|
76
|
-
};
|
|
77
|
-
max: {
|
|
78
|
-
width: number;
|
|
79
|
-
height: number;
|
|
80
|
-
cursor: string;
|
|
81
|
-
aspectRatio: number;
|
|
82
|
-
resizeMode: "crop-and-scale";
|
|
83
|
-
frameRate: ConstrainDouble;
|
|
84
|
-
logicalSurface: true;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
export declare const CONTENT_CONTRAINTS: {
|
|
89
|
-
'720': {
|
|
90
|
-
min: {
|
|
91
|
-
frameRate: number;
|
|
92
|
-
width: number;
|
|
93
|
-
height: number;
|
|
94
|
-
cursor: string;
|
|
95
|
-
aspectRatio: number;
|
|
96
|
-
resizeMode: "crop-and-scale";
|
|
97
|
-
logicalSurface: true;
|
|
98
|
-
};
|
|
99
|
-
max: {
|
|
100
|
-
width: number;
|
|
101
|
-
height: number;
|
|
102
|
-
cursor: string;
|
|
103
|
-
aspectRatio: number;
|
|
104
|
-
resizeMode: "crop-and-scale";
|
|
105
|
-
frameRate: ConstrainDouble;
|
|
106
|
-
logicalSurface: true;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
'1080': {
|
|
110
|
-
min: {
|
|
111
|
-
frameRate: number;
|
|
112
|
-
width: number;
|
|
113
|
-
height: number;
|
|
114
|
-
cursor: string;
|
|
115
|
-
aspectRatio: number;
|
|
116
|
-
resizeMode: "crop-and-scale";
|
|
117
|
-
logicalSurface: true;
|
|
118
|
-
};
|
|
119
|
-
max: {
|
|
120
|
-
width: number;
|
|
121
|
-
height: number;
|
|
122
|
-
cursor: string;
|
|
123
|
-
aspectRatio: number;
|
|
124
|
-
resizeMode: "crop-and-scale";
|
|
125
|
-
frameRate: ConstrainDouble;
|
|
126
|
-
logicalSurface: true;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
} | {
|
|
130
|
-
'720': {
|
|
131
|
-
min: {
|
|
132
|
-
frameRate: number;
|
|
133
|
-
width: {
|
|
134
|
-
ideal: number;
|
|
135
|
-
max: number;
|
|
136
|
-
};
|
|
137
|
-
height: {
|
|
138
|
-
ideal: number;
|
|
139
|
-
max: number;
|
|
140
|
-
};
|
|
141
|
-
cursor: string;
|
|
142
|
-
aspectRatio: number;
|
|
143
|
-
resizeMode: "crop-and-scale";
|
|
144
|
-
logicalSurface: true;
|
|
145
|
-
};
|
|
146
|
-
max: {
|
|
147
|
-
frameRate: {
|
|
148
|
-
ideal: number;
|
|
149
|
-
max: number;
|
|
150
|
-
};
|
|
151
|
-
width: {
|
|
152
|
-
ideal: number;
|
|
153
|
-
max: number;
|
|
154
|
-
};
|
|
155
|
-
height: {
|
|
156
|
-
ideal: number;
|
|
157
|
-
max: number;
|
|
158
|
-
};
|
|
159
|
-
cursor: string;
|
|
160
|
-
aspectRatio: number;
|
|
161
|
-
resizeMode: "crop-and-scale";
|
|
162
|
-
logicalSurface: true;
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
'1080': {
|
|
166
|
-
min: {
|
|
167
|
-
frameRate: number;
|
|
168
|
-
width: {
|
|
169
|
-
ideal: number;
|
|
170
|
-
max: number;
|
|
171
|
-
};
|
|
172
|
-
height: {
|
|
173
|
-
ideal: number;
|
|
174
|
-
max: number;
|
|
175
|
-
};
|
|
176
|
-
cursor: string;
|
|
177
|
-
aspectRatio: number;
|
|
178
|
-
resizeMode: "crop-and-scale";
|
|
179
|
-
logicalSurface: true;
|
|
180
|
-
};
|
|
181
|
-
max: {
|
|
182
|
-
frameRate: {
|
|
183
|
-
ideal: number;
|
|
184
|
-
max: number;
|
|
185
|
-
};
|
|
186
|
-
width: {
|
|
187
|
-
ideal: number;
|
|
188
|
-
max: number;
|
|
189
|
-
};
|
|
190
|
-
height: {
|
|
191
|
-
ideal: number;
|
|
192
|
-
max: number;
|
|
193
|
-
};
|
|
194
|
-
cursor: string;
|
|
195
|
-
aspectRatio: number;
|
|
196
|
-
resizeMode: "crop-and-scale";
|
|
197
|
-
logicalSurface: true;
|
|
198
|
-
};
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
export declare const PEOPLE_CONTRAINTS: {
|
|
202
|
-
[key: string]: any;
|
|
203
|
-
};
|
|
204
25
|
export declare const CONFIGURATION: RTCConfiguration;
|
|
205
26
|
export declare const NEW_CODE_MAP: {
|
|
206
27
|
[key: string]: string;
|
package/lib/src/main/client.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-10-23 12:04:44
|
|
6
6
|
*/
|
|
7
|
-
import { IClientConfig, IMackCall, IInvite, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, IServers, ILoginExtAccount, ISdkUserInfo, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternels, IVideoAudioType, ISahreContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, IContentMode } from '../type';
|
|
7
|
+
import { IClientConfig, IMackCall, IInvite, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, IServers, ILoginExtAccount, ISdkUserInfo, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternels, IVideoAudioType, ISahreContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, IContentMode, IToken, AutoMute } from '../type';
|
|
8
8
|
import Emmitter from '../tools/emmitter';
|
|
9
9
|
import Socket from '../tools/socket';
|
|
10
10
|
import Stream from './stream';
|
|
@@ -68,6 +68,8 @@ export default class Client extends Emmitter {
|
|
|
68
68
|
private conferenceInfo;
|
|
69
69
|
private customLayoutCacheList;
|
|
70
70
|
private contentMode;
|
|
71
|
+
private contentOnholdInfo;
|
|
72
|
+
private isSubscribeBulkRoster;
|
|
71
73
|
private onDocumentChange;
|
|
72
74
|
constructor(config: IClientConfig, servers: IServers, logger: Logger);
|
|
73
75
|
static instance: Client;
|
|
@@ -78,19 +80,6 @@ export default class Client extends Emmitter {
|
|
|
78
80
|
quality: number;
|
|
79
81
|
mediagroupid: number;
|
|
80
82
|
};
|
|
81
|
-
static getMeetingStatus(success: boolean, code?: string, msg?: string): {
|
|
82
|
-
success: boolean;
|
|
83
|
-
data: {
|
|
84
|
-
code: string;
|
|
85
|
-
msg: string | undefined;
|
|
86
|
-
};
|
|
87
|
-
} | {
|
|
88
|
-
success: boolean;
|
|
89
|
-
data: {
|
|
90
|
-
code?: undefined;
|
|
91
|
-
msg?: undefined;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
83
|
getClientConfig(): IClientConfig;
|
|
95
84
|
getVideoManagers(): import("../type").IVideoRenders | undefined;
|
|
96
85
|
getPreviewStreams(): import("../type").IGetMediaStreams | {
|
|
@@ -110,6 +99,7 @@ export default class Client extends Emmitter {
|
|
|
110
99
|
getRotationInfo(): import("../type").IRotationInfoTotalItem[];
|
|
111
100
|
getPeerConnectionStatus(): boolean;
|
|
112
101
|
getOnHold(): boolean;
|
|
102
|
+
getAudioTrackList(): ICustomStreamTrack[];
|
|
113
103
|
getLayoutList(): Map<string, ILayout> | undefined;
|
|
114
104
|
getSelfRoster(): IRoster | undefined;
|
|
115
105
|
/**
|
|
@@ -220,15 +210,15 @@ export default class Client extends Emmitter {
|
|
|
220
210
|
/**
|
|
221
211
|
* 开始会议,发送start call消息,通知后台服务
|
|
222
212
|
*
|
|
223
|
-
* @
|
|
213
|
+
* @private
|
|
224
214
|
*/
|
|
225
|
-
startCall
|
|
215
|
+
private startCall;
|
|
226
216
|
/**
|
|
227
217
|
* 结束会议,发送stop call消息,通知后台服务
|
|
228
218
|
*
|
|
229
|
-
* @
|
|
219
|
+
* @private
|
|
230
220
|
*/
|
|
231
|
-
stopCall
|
|
221
|
+
private stopCall;
|
|
232
222
|
/**
|
|
233
223
|
* 建会准备工作完成,通过publish开始多人会议
|
|
234
224
|
*
|
|
@@ -261,8 +251,23 @@ export default class Client extends Emmitter {
|
|
|
261
251
|
* @returns { Promise<Boolean> } 停止分享content是否成功
|
|
262
252
|
*/
|
|
263
253
|
stopShareContent(): Promise<Boolean>;
|
|
264
|
-
|
|
265
|
-
|
|
254
|
+
/**
|
|
255
|
+
* 监听 video/audio track
|
|
256
|
+
*/
|
|
257
|
+
private initTrackEvent;
|
|
258
|
+
/**
|
|
259
|
+
* content onhold时,处理content audio
|
|
260
|
+
*
|
|
261
|
+
* @private
|
|
262
|
+
* @param { ITrackInfo } rest
|
|
263
|
+
*/
|
|
264
|
+
private handleContentOnholdAudio;
|
|
265
|
+
/**
|
|
266
|
+
* 合并track
|
|
267
|
+
*
|
|
268
|
+
* @param { RTCTrackEvent } e
|
|
269
|
+
*/
|
|
270
|
+
private mergeTrackList;
|
|
266
271
|
/**
|
|
267
272
|
* 挂断会议,销毁资源
|
|
268
273
|
*/
|
|
@@ -300,12 +305,15 @@ export default class Client extends Emmitter {
|
|
|
300
305
|
* 获取随机云会议室 - 目前用于教育
|
|
301
306
|
*
|
|
302
307
|
* @public
|
|
303
|
-
* @param { string } id
|
|
308
|
+
* @param { string } id userProfileId
|
|
304
309
|
* @param { string } sk
|
|
305
|
-
* @param {
|
|
310
|
+
* @param { IToken } token
|
|
311
|
+
* @param { AutoMute } autoMute 是否静音,0:智能静音 1:全部静音 2:不静音 3:强制静音
|
|
306
312
|
* @returns { Promise<IConference> } 云会议室信息
|
|
307
313
|
*/
|
|
308
|
-
getConference(id
|
|
314
|
+
getConference(id: number | undefined, sk: string | undefined, token: IToken, params?: {
|
|
315
|
+
autoMute: AutoMute;
|
|
316
|
+
}): Promise<IConference>;
|
|
309
317
|
/**
|
|
310
318
|
* 获取错误码json链接
|
|
311
319
|
*
|
|
@@ -324,11 +332,11 @@ export default class Client extends Emmitter {
|
|
|
324
332
|
/**
|
|
325
333
|
* 音视频开启关闭操作
|
|
326
334
|
*
|
|
327
|
-
* @
|
|
335
|
+
* @private
|
|
328
336
|
* @param { 'muteAudio' | 'muteVideo' | 'unmuteAudio' | 'unmuteVideo' } type 操作类型
|
|
329
337
|
* @returns Promise<IVideoAudioType> 类型
|
|
330
338
|
*/
|
|
331
|
-
videoAudioOperate
|
|
339
|
+
private videoAudioOperate;
|
|
332
340
|
/**
|
|
333
341
|
* 静音 操作
|
|
334
342
|
*
|
|
@@ -357,6 +365,14 @@ export default class Client extends Emmitter {
|
|
|
357
365
|
* @returns { Promise<IVideoAudioType> } 操作类型
|
|
358
366
|
*/
|
|
359
367
|
unmuteVideo(): Promise<IVideoAudioType>;
|
|
368
|
+
/**
|
|
369
|
+
* 更新设备的声音状态
|
|
370
|
+
* @scene 教育平台-巡课
|
|
371
|
+
* @param type mute: 静音;unmute: 取消静音;
|
|
372
|
+
* @param callUriList 操作的设备的 callUri 或者 callUri 列表
|
|
373
|
+
* @returns [hasError, data]
|
|
374
|
+
*/
|
|
375
|
+
setPollingAudioStatus(type: 'mute' | 'unmute', callUriList: string | string[]): Promise<any>;
|
|
360
376
|
/**
|
|
361
377
|
* 举手发言 操作
|
|
362
378
|
*
|
|
@@ -378,7 +394,21 @@ export default class Client extends Emmitter {
|
|
|
378
394
|
* @returns { Promise<boolean> } 是否举手
|
|
379
395
|
*/
|
|
380
396
|
onMute(): Promise<boolean>;
|
|
397
|
+
/**
|
|
398
|
+
* 本地举手、结束发言等操作
|
|
399
|
+
*
|
|
400
|
+
* @private
|
|
401
|
+
* @param { 'handup' | 'handdown' | 'mute' } type 操作类型
|
|
402
|
+
* @param { boolean } handStatus 是否举手
|
|
403
|
+
* @returns { Promise<boolean> } 举手状态
|
|
404
|
+
*/
|
|
381
405
|
private onHand;
|
|
406
|
+
/**
|
|
407
|
+
* 告知媒体是否开启出入会通知
|
|
408
|
+
*
|
|
409
|
+
* @private
|
|
410
|
+
*/
|
|
411
|
+
private sendConfParam;
|
|
382
412
|
/**
|
|
383
413
|
* 获取可支持的编解码
|
|
384
414
|
*
|
|
@@ -421,6 +451,13 @@ export default class Client extends Emmitter {
|
|
|
421
451
|
* @param { any } data 媒体消息
|
|
422
452
|
*/
|
|
423
453
|
private onPassThroughMessage;
|
|
454
|
+
/**
|
|
455
|
+
* 处理contentOnhold
|
|
456
|
+
*
|
|
457
|
+
* @private
|
|
458
|
+
* @param { IConfProperty } info
|
|
459
|
+
*/
|
|
460
|
+
private handleContentOnhold;
|
|
424
461
|
/**
|
|
425
462
|
* 是否开启自动调整带宽
|
|
426
463
|
*
|
|
@@ -432,7 +469,8 @@ export default class Client extends Emmitter {
|
|
|
432
469
|
* 当websocket error,挂断会议
|
|
433
470
|
*
|
|
434
471
|
* @private
|
|
435
|
-
* @param { string }
|
|
472
|
+
* @param { string } errorCode 错误码
|
|
473
|
+
* @param { TErrorReason } detail 详情
|
|
436
474
|
*/
|
|
437
475
|
private disconnectInWssError;
|
|
438
476
|
/**
|
|
@@ -522,7 +560,7 @@ export default class Client extends Emmitter {
|
|
|
522
560
|
* 发布当前正在分享 content 的用户详细信息
|
|
523
561
|
*
|
|
524
562
|
* @public
|
|
525
|
-
* @param { IRoster | null } next content
|
|
563
|
+
* @param { IRoster | null } next content详细信息
|
|
526
564
|
*/
|
|
527
565
|
sendContentRosterMessage(next: IRoster | null): void;
|
|
528
566
|
/**
|
|
@@ -596,7 +634,7 @@ export default class Client extends Emmitter {
|
|
|
596
634
|
* @param { string } id rosterId
|
|
597
635
|
* @returns Promise<string> rosterId
|
|
598
636
|
*/
|
|
599
|
-
forceFullScreen(id
|
|
637
|
+
forceFullScreen(id?: string): Promise<string>;
|
|
600
638
|
/**
|
|
601
639
|
* 发送websocket消息方法
|
|
602
640
|
*
|
|
@@ -606,6 +644,7 @@ export default class Client extends Emmitter {
|
|
|
606
644
|
* @param { boolean } isLog 是否写入日志
|
|
607
645
|
*/
|
|
608
646
|
sendSocketMessage(data: any, isAutoAdd?: boolean, isLog?: boolean): void;
|
|
647
|
+
private getBasicInfo;
|
|
609
648
|
/**
|
|
610
649
|
* 校验会议室号
|
|
611
650
|
*
|
|
@@ -621,6 +660,12 @@ export default class Client extends Emmitter {
|
|
|
621
660
|
* @param { string } deviceId 设备ID
|
|
622
661
|
*/
|
|
623
662
|
setAudioOutputDevice(deviceId: string): void;
|
|
663
|
+
/**
|
|
664
|
+
* 移除对应的AudioRender
|
|
665
|
+
*
|
|
666
|
+
* @param { string } key endpoinId + mediagroupId 唯一的用户id值
|
|
667
|
+
*/
|
|
668
|
+
removeAuidoRender(key: string): void;
|
|
624
669
|
/**
|
|
625
670
|
* 开始巡课
|
|
626
671
|
*
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @email luojinghui424@gmail.com
|
|
7
7
|
*
|
|
8
8
|
* Created at : 2021-01-05 17:24:07
|
|
9
|
-
* Last modified : 2022-
|
|
9
|
+
* Last modified : 2022-05-12 20:02:39
|
|
10
10
|
*/
|
|
11
11
|
import Logger from '../tools/logger';
|
|
12
|
-
import { ILayout, IVideoRenders, IRoster, ITemplateObj, IScreenInfo, IMode, IOutputCustomLayout, ILayoutRoster, IResolutionType, IConfInfo, IPageInfo, IReqInfo, IQualityType
|
|
12
|
+
import { ILayout, IVideoRenders, IRoster, ITemplateObj, IScreenInfo, IMode, IOutputCustomLayout, ILayoutRoster, IResolutionType, IConfInfo, IPageInfo, IReqInfo, IQualityType } from '../type/index';
|
|
13
13
|
import Client from './client';
|
|
14
14
|
export default class LayoutManager {
|
|
15
15
|
logger: Logger;
|
|
@@ -25,7 +25,6 @@ export default class LayoutManager {
|
|
|
25
25
|
private templateMode;
|
|
26
26
|
private templateModeTemp;
|
|
27
27
|
private templateRate;
|
|
28
|
-
private specifyTemplateMode;
|
|
29
28
|
private content;
|
|
30
29
|
private screenInfo;
|
|
31
30
|
private internelsLayout;
|
|
@@ -59,14 +58,32 @@ export default class LayoutManager {
|
|
|
59
58
|
getTemplateMode(): IMode;
|
|
60
59
|
getConfInfo(): IConfInfo;
|
|
61
60
|
getInternelsLayout(): IOutputCustomLayout;
|
|
61
|
+
getLocalShareState(): boolean;
|
|
62
62
|
setOrderRosterList(orderRosterList: IRoster[]): void;
|
|
63
63
|
setOriginOrderRosters(originOrderRosters: IRoster[]): void;
|
|
64
|
+
/**
|
|
65
|
+
* 设置发布全屏layout id
|
|
66
|
+
*
|
|
67
|
+
* @param { string } id forcelayout roster id
|
|
68
|
+
*/
|
|
64
69
|
setForceFullScreenId(id?: string): void;
|
|
65
70
|
setTemplateMode(templateMode: IMode): void;
|
|
66
|
-
setContentRosterItem(content: IRoster): void;
|
|
71
|
+
setContentRosterItem(content: IRoster | null): void;
|
|
67
72
|
setConfInfo(confInfo: IConfInfo): void;
|
|
73
|
+
/**
|
|
74
|
+
* 本地分享content, 设置对应布局、页码
|
|
75
|
+
*
|
|
76
|
+
* @public
|
|
77
|
+
* @param { boolean } is 本地是否分享content
|
|
78
|
+
*/
|
|
68
79
|
setLocalShareContent(is: boolean): void;
|
|
69
|
-
|
|
80
|
+
/**
|
|
81
|
+
* 计算显示模板数据
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
* @returns
|
|
85
|
+
*/
|
|
86
|
+
calcTemplate(): {
|
|
70
87
|
tempLayout: ITemplateObj[];
|
|
71
88
|
templateRate: number;
|
|
72
89
|
};
|
|
@@ -99,31 +116,43 @@ export default class LayoutManager {
|
|
|
99
116
|
*/
|
|
100
117
|
clearInvalidVideoManagers(): void;
|
|
101
118
|
/**
|
|
102
|
-
*
|
|
119
|
+
* [AUTO] 重新计算页码信息、模板类型
|
|
120
|
+
*
|
|
121
|
+
* @public
|
|
103
122
|
*/
|
|
104
|
-
calcPageInfo(): void;
|
|
123
|
+
calcPageInfo(confInfo?: IConfInfo): void;
|
|
105
124
|
/**
|
|
106
|
-
* AUTO
|
|
107
|
-
*
|
|
125
|
+
* [AUTO] 分页
|
|
126
|
+
*
|
|
127
|
+
* @public
|
|
128
|
+
* @param { number } currentPage 请求某一页数据
|
|
108
129
|
*/
|
|
109
130
|
setPageInfo(currentPage?: number): void;
|
|
110
131
|
/**
|
|
111
|
-
* 全屏请流
|
|
132
|
+
* [AUTO] 全屏请流
|
|
133
|
+
*
|
|
134
|
+
* @public
|
|
112
135
|
*/
|
|
113
|
-
calcForceFullScreenRequestLayout():
|
|
136
|
+
calcForceFullScreenRequestLayout(): void;
|
|
114
137
|
/**
|
|
115
|
-
* AUTO
|
|
138
|
+
* [AUTO] 请流
|
|
139
|
+
*
|
|
140
|
+
* @public
|
|
141
|
+
* @param { IPageInfo } pageInfo 页码信息
|
|
116
142
|
*/
|
|
117
143
|
calcRequestNewLayout(pageInfo?: IPageInfo): void;
|
|
118
144
|
/**
|
|
119
|
-
* AUTO : 基于 new layout result 消息生成 customLayoutList 数据,并diff对比更新数据
|
|
120
|
-
*
|
|
145
|
+
* [AUTO] : 基于 new layout result 消息生成 customLayoutList 数据,并diff对比更新数据
|
|
146
|
+
*
|
|
147
|
+
* @public
|
|
148
|
+
* @param { ILayoutRoster[] } totalLayoutResultList
|
|
121
149
|
*/
|
|
122
150
|
createAutoLayout(totalLayoutResultList: ILayoutRoster[]): void;
|
|
123
151
|
/**
|
|
124
152
|
* 创建排好序的roster数据
|
|
125
153
|
*
|
|
126
|
-
* @
|
|
154
|
+
* @private
|
|
155
|
+
* @param { ILayoutRoster[] } totalLayoutResultList
|
|
127
156
|
*/
|
|
128
157
|
private createOrderRoster;
|
|
129
158
|
createCustomLayout(totalLayoutResultList: ILayoutRoster[]): void;
|
|
@@ -135,7 +164,6 @@ export default class LayoutManager {
|
|
|
135
164
|
requestLayout(reqList: IReqInfo[]): void;
|
|
136
165
|
calculatePosition(): void;
|
|
137
166
|
calculateRotate(): void;
|
|
138
|
-
requestLayoutCalculator(): ICustomLayout[];
|
|
139
167
|
getVideoStreamByTrackId(videoTrackId: string): {
|
|
140
168
|
videoStream: MediaStream | null;
|
|
141
169
|
track: MediaStreamTrack | null;
|
|
@@ -152,10 +180,9 @@ export default class LayoutManager {
|
|
|
152
180
|
rateHeight: number;
|
|
153
181
|
rateWidth: number;
|
|
154
182
|
};
|
|
155
|
-
requestCustomLayout(): void;
|
|
156
183
|
createLayout(): void;
|
|
157
184
|
calculateOrderRosterList(): IRoster[];
|
|
158
|
-
switchLayout(templateMode?: IMode): IMode
|
|
185
|
+
switchLayout(templateMode?: IMode): IMode;
|
|
159
186
|
/**
|
|
160
187
|
* 【内部方法】停止轮询时,清理无效的 videoManager 数据
|
|
161
188
|
*
|
package/lib/src/main/peer.d.ts
CHANGED
|
@@ -201,6 +201,7 @@ export default class Peer {
|
|
|
201
201
|
* @param { IStreamObj } item 自定义Stream流对象
|
|
202
202
|
*/
|
|
203
203
|
private addStreamRenders;
|
|
204
|
+
preferCodec(codecs: RTCRtpCodecCapability[], mimeType: string): RTCRtpCodecCapability[];
|
|
204
205
|
/**
|
|
205
206
|
* 向peer添加Track轨道数据
|
|
206
207
|
*
|
|
@@ -244,6 +245,7 @@ export default class Peer {
|
|
|
244
245
|
* 获取sender的发送数据
|
|
245
246
|
*
|
|
246
247
|
* @private
|
|
248
|
+
* @param { 'sender' | 'audioSender' } key
|
|
247
249
|
* @param { RTCStatsReport } stats sender发送器的统计数据
|
|
248
250
|
* @param { IInternels } internels 自定义internels统计数据
|
|
249
251
|
* @param { IStreamSender } senderItem sender发送器对象
|
|
@@ -260,6 +262,7 @@ export default class Peer {
|
|
|
260
262
|
* @returns { IReceiver } 接收端的统计数据
|
|
261
263
|
*/
|
|
262
264
|
private getReceiverStatus;
|
|
265
|
+
private getReceiverAudioTrackStatus;
|
|
263
266
|
/**
|
|
264
267
|
* 计算速率
|
|
265
268
|
*
|
package/lib/src/main/stream.d.ts
CHANGED
|
@@ -25,8 +25,8 @@ export default class Stream extends Emmitter {
|
|
|
25
25
|
private isShareContent;
|
|
26
26
|
private audioDeviceId;
|
|
27
27
|
private videoDeviceId;
|
|
28
|
-
private initContraints;
|
|
29
28
|
private isFirefox;
|
|
29
|
+
private isReduceResolution;
|
|
30
30
|
constructor(params: {
|
|
31
31
|
logger: Logger;
|
|
32
32
|
client?: Client;
|
|
@@ -115,6 +115,20 @@ export default class Stream extends Emmitter {
|
|
|
115
115
|
muteVideo?: boolean;
|
|
116
116
|
muteAudio?: boolean;
|
|
117
117
|
}): Promise<IStatus>;
|
|
118
|
+
/**
|
|
119
|
+
* 获取content采集配置信息
|
|
120
|
+
*
|
|
121
|
+
* @param {180 | 360 | 720} resolution
|
|
122
|
+
* @returns
|
|
123
|
+
*/
|
|
124
|
+
private getPeopleContraints;
|
|
125
|
+
/**
|
|
126
|
+
* 获取content采集配置信息
|
|
127
|
+
*
|
|
128
|
+
* @param { 720 | 1080 } resolution
|
|
129
|
+
* @returns
|
|
130
|
+
*/
|
|
131
|
+
private getContentContrints;
|
|
118
132
|
/**
|
|
119
133
|
*
|
|
120
134
|
* @param { boolean } video 是否开启摄像头
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-10-24 14:06:05
|
|
6
6
|
*/
|
|
7
|
-
export declare const version = "2.0
|
|
7
|
+
export declare const version = "2.1.0 - build on 2022-05-20 13:50";
|
|
8
8
|
export declare const proxy: {
|
|
9
9
|
wssHost: string;
|
|
10
10
|
restHost: string;
|
|
@@ -27,14 +27,27 @@ declare class HttpClient {
|
|
|
27
27
|
logger: Logger | null;
|
|
28
28
|
private baseUrl;
|
|
29
29
|
private clientId;
|
|
30
|
+
private clientSecret;
|
|
30
31
|
private retryCount;
|
|
31
32
|
constructor(commonOption: IAxiosRequestConfig);
|
|
32
33
|
refreshToken(baseURL?: string): Promise<any>;
|
|
33
34
|
setLogger(logger: Logger): void;
|
|
34
35
|
setBaseUrl(url: string): void;
|
|
35
|
-
|
|
36
|
+
setClientInfo({ clientId, clientSecret }: {
|
|
37
|
+
clientId: string;
|
|
38
|
+
clientSecret: string;
|
|
39
|
+
}): void;
|
|
36
40
|
setHttpConfig(config: IAxiosRequestConfig): void;
|
|
37
|
-
|
|
41
|
+
getApiHeader(params: ISignParams): {
|
|
42
|
+
Authorization?: string | undefined;
|
|
43
|
+
'x-xy-clientid': string;
|
|
44
|
+
'x-xy-clienttype': string;
|
|
45
|
+
'x-xy-nonce': number;
|
|
46
|
+
'x-xy-timestamp': number;
|
|
47
|
+
'x-xy-signtype': string;
|
|
48
|
+
'x-xy-sign': string;
|
|
49
|
+
'x-xy-signatureversion': string;
|
|
50
|
+
};
|
|
38
51
|
setLoginInfo(loginInfo: IToken | null): void;
|
|
39
52
|
getLoginInfo(): any;
|
|
40
53
|
assignOptions: (option?: AxiosRequestConfig | undefined) => AxiosRequestConfig & {
|
|
@@ -33,7 +33,7 @@ declare class Socket {
|
|
|
33
33
|
removeEvent(): void;
|
|
34
34
|
onOpenSocket: (e: any) => void;
|
|
35
35
|
onHandleMessage: (e: any) => void;
|
|
36
|
-
onCloseSocket: (e:
|
|
36
|
+
onCloseSocket: (e: CloseEvent) => void;
|
|
37
37
|
onErrorSocket: (e: any) => void;
|
|
38
38
|
sendHeartBeat(): void;
|
|
39
39
|
creatTimeout(): void;
|
package/lib/src/tools/utils.d.ts
CHANGED
|
@@ -51,4 +51,17 @@ export declare const getStatus: (code: string, detail?: any, msg?: string) => {
|
|
|
51
51
|
msg: string;
|
|
52
52
|
detail: any;
|
|
53
53
|
};
|
|
54
|
+
export declare const getMeetingStatus: (success: boolean, code?: string | undefined, msg?: string | undefined) => {
|
|
55
|
+
success: boolean;
|
|
56
|
+
data: {
|
|
57
|
+
code: string;
|
|
58
|
+
msg: string | undefined;
|
|
59
|
+
};
|
|
60
|
+
} | {
|
|
61
|
+
success: boolean;
|
|
62
|
+
data: {
|
|
63
|
+
code?: undefined;
|
|
64
|
+
msg?: undefined;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
54
67
|
export declare const getErrorMsg: (err: Error) => string;
|