@xylink/xy-rtc-sdk 2.0.4 → 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 -0
- package/lib/index.js +1 -1
- package/lib/src/action/index.d.ts +40 -13
- 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 +15 -186
- package/lib/src/main/client.d.ts +89 -29
- package/lib/src/main/helper.d.ts +1 -1
- package/lib/src/main/layoutManager.d.ts +46 -18
- package/lib/src/main/peer.d.ts +27 -4
- package/lib/src/main/stream.d.ts +27 -1
- package/lib/src/main/videoManager.d.ts +1 -1
- package/lib/src/tools/browser.d.ts +3 -1
- package/lib/src/tools/config.d.ts +1 -1
- package/lib/src/tools/detect.d.ts +1 -0
- package/lib/src/tools/httpClient.d.ts +21 -11
- package/lib/src/tools/socket.d.ts +1 -1
- package/lib/src/tools/utils.d.ts +15 -2
- package/lib/src/tools/verify.d.ts +7 -0
- package/lib/src/type/base.d.ts +39 -2
- package/lib/src/type/client.d.ts +70 -10
- package/lib/src/type/stream.d.ts +29 -2
- package/package.json +7 -4
- package/lib/index.cjs.js +0 -1
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
|
-
export declare const STREAM_ERROR_CODE_MAP:
|
|
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
|
-
frameRate: number;
|
|
59
|
-
width: number;
|
|
60
|
-
height: number;
|
|
61
|
-
cursor: string;
|
|
62
|
-
aspectRatio: number;
|
|
63
|
-
resizeMode: "crop-and-scale";
|
|
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
|
-
frameRate: number;
|
|
79
|
-
width: number;
|
|
80
|
-
height: number;
|
|
81
|
-
cursor: string;
|
|
82
|
-
aspectRatio: number;
|
|
83
|
-
resizeMode: "crop-and-scale";
|
|
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
|
-
frameRate: number;
|
|
101
|
-
width: number;
|
|
102
|
-
height: number;
|
|
103
|
-
cursor: string;
|
|
104
|
-
aspectRatio: number;
|
|
105
|
-
resizeMode: "crop-and-scale";
|
|
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
|
-
frameRate: number;
|
|
121
|
-
width: number;
|
|
122
|
-
height: number;
|
|
123
|
-
cursor: string;
|
|
124
|
-
aspectRatio: number;
|
|
125
|
-
resizeMode: "crop-and-scale";
|
|
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;
|
|
@@ -218,3 +39,11 @@ export declare const APP_NAME: {
|
|
|
218
39
|
export declare const EVENT_TYPE_MAP: {
|
|
219
40
|
[key: string]: string;
|
|
220
41
|
};
|
|
42
|
+
export declare const CONTENT_AUDIO_OFFER_STATE: {
|
|
43
|
+
NOT_SEND: number;
|
|
44
|
+
SEND: number;
|
|
45
|
+
SENDED: number;
|
|
46
|
+
};
|
|
47
|
+
export declare const SCALE_RESOLUTION_MAP: {
|
|
48
|
+
[key: string]: number;
|
|
49
|
+
};
|
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 } 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';
|
|
@@ -67,6 +67,9 @@ export default class Client extends Emmitter {
|
|
|
67
67
|
private meetingQualityData;
|
|
68
68
|
private conferenceInfo;
|
|
69
69
|
private customLayoutCacheList;
|
|
70
|
+
private contentMode;
|
|
71
|
+
private contentOnholdInfo;
|
|
72
|
+
private isSubscribeBulkRoster;
|
|
70
73
|
private onDocumentChange;
|
|
71
74
|
constructor(config: IClientConfig, servers: IServers, logger: Logger);
|
|
72
75
|
static instance: Client;
|
|
@@ -77,19 +80,6 @@ export default class Client extends Emmitter {
|
|
|
77
80
|
quality: number;
|
|
78
81
|
mediagroupid: number;
|
|
79
82
|
};
|
|
80
|
-
static getMeetingStatus(success: boolean, code?: number, msg?: string): {
|
|
81
|
-
success: boolean;
|
|
82
|
-
data: {
|
|
83
|
-
code: number;
|
|
84
|
-
msg: string | undefined;
|
|
85
|
-
};
|
|
86
|
-
} | {
|
|
87
|
-
success: boolean;
|
|
88
|
-
data: {
|
|
89
|
-
code?: undefined;
|
|
90
|
-
msg?: undefined;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
83
|
getClientConfig(): IClientConfig;
|
|
94
84
|
getVideoManagers(): import("../type").IVideoRenders | undefined;
|
|
95
85
|
getPreviewStreams(): import("../type").IGetMediaStreams | {
|
|
@@ -109,8 +99,15 @@ export default class Client extends Emmitter {
|
|
|
109
99
|
getRotationInfo(): import("../type").IRotationInfoTotalItem[];
|
|
110
100
|
getPeerConnectionStatus(): boolean;
|
|
111
101
|
getOnHold(): boolean;
|
|
102
|
+
getAudioTrackList(): ICustomStreamTrack[];
|
|
112
103
|
getLayoutList(): Map<string, ILayout> | undefined;
|
|
113
104
|
getSelfRoster(): IRoster | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* 退会时 重置初始化参数
|
|
107
|
+
*
|
|
108
|
+
*/
|
|
109
|
+
resetInitParameter(): void;
|
|
110
|
+
setContentMode(mode: IContentMode): void;
|
|
114
111
|
/**
|
|
115
112
|
* 切换显示/隐藏 Local 画面
|
|
116
113
|
*
|
|
@@ -135,6 +132,13 @@ export default class Client extends Emmitter {
|
|
|
135
132
|
* @param { string } wrapEle 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
|
|
136
133
|
*/
|
|
137
134
|
setVideoRenderer(key: string, wrapEleId: string): void;
|
|
135
|
+
/**
|
|
136
|
+
* 移除绑定的streamId
|
|
137
|
+
*
|
|
138
|
+
* @param { string } key endpoinId + mediagroupId 唯一的用户id值
|
|
139
|
+
* @param { string } wrapEle 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
|
|
140
|
+
*/
|
|
141
|
+
removeVideoRender(key: string, wrapEleId: string): void;
|
|
138
142
|
/**
|
|
139
143
|
* 重新播放视频
|
|
140
144
|
*
|
|
@@ -206,15 +210,15 @@ export default class Client extends Emmitter {
|
|
|
206
210
|
/**
|
|
207
211
|
* 开始会议,发送start call消息,通知后台服务
|
|
208
212
|
*
|
|
209
|
-
* @
|
|
213
|
+
* @private
|
|
210
214
|
*/
|
|
211
|
-
startCall
|
|
215
|
+
private startCall;
|
|
212
216
|
/**
|
|
213
217
|
* 结束会议,发送stop call消息,通知后台服务
|
|
214
218
|
*
|
|
215
|
-
* @
|
|
219
|
+
* @private
|
|
216
220
|
*/
|
|
217
|
-
stopCall
|
|
221
|
+
private stopCall;
|
|
218
222
|
/**
|
|
219
223
|
* 建会准备工作完成,通过publish开始多人会议
|
|
220
224
|
*
|
|
@@ -247,8 +251,23 @@ export default class Client extends Emmitter {
|
|
|
247
251
|
* @returns { Promise<Boolean> } 停止分享content是否成功
|
|
248
252
|
*/
|
|
249
253
|
stopShareContent(): Promise<Boolean>;
|
|
250
|
-
|
|
251
|
-
|
|
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;
|
|
252
271
|
/**
|
|
253
272
|
* 挂断会议,销毁资源
|
|
254
273
|
*/
|
|
@@ -270,7 +289,7 @@ export default class Client extends Emmitter {
|
|
|
270
289
|
* @param { string } password
|
|
271
290
|
*/
|
|
272
291
|
getExternalLoginInfo(sdkUserInfo: ISdkUserInfo, params: ILoginExtAccount): Promise<{
|
|
273
|
-
code:
|
|
292
|
+
code: string;
|
|
274
293
|
msg: string;
|
|
275
294
|
detail: any;
|
|
276
295
|
}>;
|
|
@@ -286,12 +305,15 @@ export default class Client extends Emmitter {
|
|
|
286
305
|
* 获取随机云会议室 - 目前用于教育
|
|
287
306
|
*
|
|
288
307
|
* @public
|
|
289
|
-
* @param { string } id
|
|
308
|
+
* @param { string } id userProfileId
|
|
290
309
|
* @param { string } sk
|
|
291
|
-
* @param {
|
|
310
|
+
* @param { IToken } token
|
|
311
|
+
* @param { AutoMute } autoMute 是否静音,0:智能静音 1:全部静音 2:不静音 3:强制静音
|
|
292
312
|
* @returns { Promise<IConference> } 云会议室信息
|
|
293
313
|
*/
|
|
294
|
-
getConference(id
|
|
314
|
+
getConference(id: number | undefined, sk: string | undefined, token: IToken, params?: {
|
|
315
|
+
autoMute: AutoMute;
|
|
316
|
+
}): Promise<IConference>;
|
|
295
317
|
/**
|
|
296
318
|
* 获取错误码json链接
|
|
297
319
|
*
|
|
@@ -310,11 +332,11 @@ export default class Client extends Emmitter {
|
|
|
310
332
|
/**
|
|
311
333
|
* 音视频开启关闭操作
|
|
312
334
|
*
|
|
313
|
-
* @
|
|
335
|
+
* @private
|
|
314
336
|
* @param { 'muteAudio' | 'muteVideo' | 'unmuteAudio' | 'unmuteVideo' } type 操作类型
|
|
315
337
|
* @returns Promise<IVideoAudioType> 类型
|
|
316
338
|
*/
|
|
317
|
-
videoAudioOperate
|
|
339
|
+
private videoAudioOperate;
|
|
318
340
|
/**
|
|
319
341
|
* 静音 操作
|
|
320
342
|
*
|
|
@@ -343,6 +365,14 @@ export default class Client extends Emmitter {
|
|
|
343
365
|
* @returns { Promise<IVideoAudioType> } 操作类型
|
|
344
366
|
*/
|
|
345
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>;
|
|
346
376
|
/**
|
|
347
377
|
* 举手发言 操作
|
|
348
378
|
*
|
|
@@ -364,7 +394,21 @@ export default class Client extends Emmitter {
|
|
|
364
394
|
* @returns { Promise<boolean> } 是否举手
|
|
365
395
|
*/
|
|
366
396
|
onMute(): Promise<boolean>;
|
|
397
|
+
/**
|
|
398
|
+
* 本地举手、结束发言等操作
|
|
399
|
+
*
|
|
400
|
+
* @private
|
|
401
|
+
* @param { 'handup' | 'handdown' | 'mute' } type 操作类型
|
|
402
|
+
* @param { boolean } handStatus 是否举手
|
|
403
|
+
* @returns { Promise<boolean> } 举手状态
|
|
404
|
+
*/
|
|
367
405
|
private onHand;
|
|
406
|
+
/**
|
|
407
|
+
* 告知媒体是否开启出入会通知
|
|
408
|
+
*
|
|
409
|
+
* @private
|
|
410
|
+
*/
|
|
411
|
+
private sendConfParam;
|
|
368
412
|
/**
|
|
369
413
|
* 获取可支持的编解码
|
|
370
414
|
*
|
|
@@ -407,6 +451,13 @@ export default class Client extends Emmitter {
|
|
|
407
451
|
* @param { any } data 媒体消息
|
|
408
452
|
*/
|
|
409
453
|
private onPassThroughMessage;
|
|
454
|
+
/**
|
|
455
|
+
* 处理contentOnhold
|
|
456
|
+
*
|
|
457
|
+
* @private
|
|
458
|
+
* @param { IConfProperty } info
|
|
459
|
+
*/
|
|
460
|
+
private handleContentOnhold;
|
|
410
461
|
/**
|
|
411
462
|
* 是否开启自动调整带宽
|
|
412
463
|
*
|
|
@@ -418,7 +469,8 @@ export default class Client extends Emmitter {
|
|
|
418
469
|
* 当websocket error,挂断会议
|
|
419
470
|
*
|
|
420
471
|
* @private
|
|
421
|
-
* @param {
|
|
472
|
+
* @param { string } errorCode 错误码
|
|
473
|
+
* @param { TErrorReason } detail 详情
|
|
422
474
|
*/
|
|
423
475
|
private disconnectInWssError;
|
|
424
476
|
/**
|
|
@@ -508,7 +560,7 @@ export default class Client extends Emmitter {
|
|
|
508
560
|
* 发布当前正在分享 content 的用户详细信息
|
|
509
561
|
*
|
|
510
562
|
* @public
|
|
511
|
-
* @param { IRoster | null } next content
|
|
563
|
+
* @param { IRoster | null } next content详细信息
|
|
512
564
|
*/
|
|
513
565
|
sendContentRosterMessage(next: IRoster | null): void;
|
|
514
566
|
/**
|
|
@@ -582,7 +634,7 @@ export default class Client extends Emmitter {
|
|
|
582
634
|
* @param { string } id rosterId
|
|
583
635
|
* @returns Promise<string> rosterId
|
|
584
636
|
*/
|
|
585
|
-
forceFullScreen(id
|
|
637
|
+
forceFullScreen(id?: string): Promise<string>;
|
|
586
638
|
/**
|
|
587
639
|
* 发送websocket消息方法
|
|
588
640
|
*
|
|
@@ -592,6 +644,7 @@ export default class Client extends Emmitter {
|
|
|
592
644
|
* @param { boolean } isLog 是否写入日志
|
|
593
645
|
*/
|
|
594
646
|
sendSocketMessage(data: any, isAutoAdd?: boolean, isLog?: boolean): void;
|
|
647
|
+
private getBasicInfo;
|
|
595
648
|
/**
|
|
596
649
|
* 校验会议室号
|
|
597
650
|
*
|
|
@@ -607,6 +660,12 @@ export default class Client extends Emmitter {
|
|
|
607
660
|
* @param { string } deviceId 设备ID
|
|
608
661
|
*/
|
|
609
662
|
setAudioOutputDevice(deviceId: string): void;
|
|
663
|
+
/**
|
|
664
|
+
* 移除对应的AudioRender
|
|
665
|
+
*
|
|
666
|
+
* @param { string } key endpoinId + mediagroupId 唯一的用户id值
|
|
667
|
+
*/
|
|
668
|
+
removeAuidoRender(key: string): void;
|
|
610
669
|
/**
|
|
611
670
|
* 开始巡课
|
|
612
671
|
*
|
|
@@ -627,6 +686,7 @@ export default class Client extends Emmitter {
|
|
|
627
686
|
* @public
|
|
628
687
|
*/
|
|
629
688
|
subscribeBulkRoster(): Promise<unknown>;
|
|
689
|
+
reSendContentOffer(): void;
|
|
630
690
|
/**
|
|
631
691
|
* 定时上报会议质量、网络数据
|
|
632
692
|
*
|
package/lib/src/main/helper.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @email luojinghui424@gmail.com
|
|
6
6
|
*
|
|
7
7
|
* Created at : 2021-01-09 14:45:46
|
|
8
|
-
* Last modified : 2021-
|
|
8
|
+
* Last modified : 2021-12-08 11:16:01
|
|
9
9
|
*/
|
|
10
10
|
import { ILayout, IVideoManagerState, IRotationInfoTotalItem } from '../type';
|
|
11
11
|
export declare const getLayoutItemState: (item: ILayout | ILayout, stream: MediaStream | null, vmState: IVideoManagerState) => "REQUEST" | "MUTE" | "NORMAL" | "AUDIO_TEL" | "AUDIO_ONLY" | "AUDIO_CONTENT";
|
|
@@ -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 :
|
|
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
|
};
|
|
@@ -87,6 +104,7 @@ export default class LayoutManager {
|
|
|
87
104
|
* @param wrapEleId wrap video element id
|
|
88
105
|
*/
|
|
89
106
|
setVideoRenderer(key: string, wrapEleId: string): void;
|
|
107
|
+
removeVideoRenderer(key: string, wrapEleId: string): void;
|
|
90
108
|
playVideo(keys?: string[]): Promise<void>;
|
|
91
109
|
updateLocalTrack(): void;
|
|
92
110
|
/**
|
|
@@ -98,31 +116,43 @@ export default class LayoutManager {
|
|
|
98
116
|
*/
|
|
99
117
|
clearInvalidVideoManagers(): void;
|
|
100
118
|
/**
|
|
101
|
-
*
|
|
119
|
+
* [AUTO] 重新计算页码信息、模板类型
|
|
120
|
+
*
|
|
121
|
+
* @public
|
|
102
122
|
*/
|
|
103
|
-
calcPageInfo(): void;
|
|
123
|
+
calcPageInfo(confInfo?: IConfInfo): void;
|
|
104
124
|
/**
|
|
105
|
-
* AUTO
|
|
106
|
-
*
|
|
125
|
+
* [AUTO] 分页
|
|
126
|
+
*
|
|
127
|
+
* @public
|
|
128
|
+
* @param { number } currentPage 请求某一页数据
|
|
107
129
|
*/
|
|
108
130
|
setPageInfo(currentPage?: number): void;
|
|
109
131
|
/**
|
|
110
|
-
* 全屏请流
|
|
132
|
+
* [AUTO] 全屏请流
|
|
133
|
+
*
|
|
134
|
+
* @public
|
|
111
135
|
*/
|
|
112
|
-
calcForceFullScreenRequestLayout():
|
|
136
|
+
calcForceFullScreenRequestLayout(): void;
|
|
113
137
|
/**
|
|
114
|
-
* AUTO
|
|
138
|
+
* [AUTO] 请流
|
|
139
|
+
*
|
|
140
|
+
* @public
|
|
141
|
+
* @param { IPageInfo } pageInfo 页码信息
|
|
115
142
|
*/
|
|
116
143
|
calcRequestNewLayout(pageInfo?: IPageInfo): void;
|
|
117
144
|
/**
|
|
118
|
-
* AUTO : 基于 new layout result 消息生成 customLayoutList 数据,并diff对比更新数据
|
|
119
|
-
*
|
|
145
|
+
* [AUTO] : 基于 new layout result 消息生成 customLayoutList 数据,并diff对比更新数据
|
|
146
|
+
*
|
|
147
|
+
* @public
|
|
148
|
+
* @param { ILayoutRoster[] } totalLayoutResultList
|
|
120
149
|
*/
|
|
121
150
|
createAutoLayout(totalLayoutResultList: ILayoutRoster[]): void;
|
|
122
151
|
/**
|
|
123
152
|
* 创建排好序的roster数据
|
|
124
153
|
*
|
|
125
|
-
* @
|
|
154
|
+
* @private
|
|
155
|
+
* @param { ILayoutRoster[] } totalLayoutResultList
|
|
126
156
|
*/
|
|
127
157
|
private createOrderRoster;
|
|
128
158
|
createCustomLayout(totalLayoutResultList: ILayoutRoster[]): void;
|
|
@@ -134,7 +164,6 @@ export default class LayoutManager {
|
|
|
134
164
|
requestLayout(reqList: IReqInfo[]): void;
|
|
135
165
|
calculatePosition(): void;
|
|
136
166
|
calculateRotate(): void;
|
|
137
|
-
requestLayoutCalculator(): ICustomLayout[];
|
|
138
167
|
getVideoStreamByTrackId(videoTrackId: string): {
|
|
139
168
|
videoStream: MediaStream | null;
|
|
140
169
|
track: MediaStreamTrack | null;
|
|
@@ -151,10 +180,9 @@ export default class LayoutManager {
|
|
|
151
180
|
rateHeight: number;
|
|
152
181
|
rateWidth: number;
|
|
153
182
|
};
|
|
154
|
-
requestCustomLayout(): void;
|
|
155
183
|
createLayout(): void;
|
|
156
184
|
calculateOrderRosterList(): IRoster[];
|
|
157
|
-
switchLayout(templateMode?: IMode): IMode
|
|
185
|
+
switchLayout(templateMode?: IMode): IMode;
|
|
158
186
|
/**
|
|
159
187
|
* 【内部方法】停止轮询时,清理无效的 videoManager 数据
|
|
160
188
|
*
|