@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
package/lib/action/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ILoginExtAccount, ISdkUserInfo, TEventName, IMeetingInfo, TCategory, IToken, IGetConferenceParams, IMeetingInviteParams, IMediaConfigParam, LoginType, LoginParams } from '../type';
|
|
2
|
-
import Logger from '../tools/logger';
|
|
1
|
+
import { ILoginExtAccount, ISdkUserInfo, TEventName, IMeetingInfo, TCategory, IToken, IGetConferenceParams, IMeetingInviteParams, IMediaConfigParam, LoginType, LoginParams, SignInTextParams } from '../type';
|
|
2
|
+
import Logger from '../tools/log/logger';
|
|
3
3
|
export interface ICommonParams {
|
|
4
4
|
securityKey: string;
|
|
5
5
|
}
|
|
@@ -14,24 +14,56 @@ declare class Action {
|
|
|
14
14
|
private statesTime;
|
|
15
15
|
private httpDefaultBaseUrl;
|
|
16
16
|
private logHttpDefaultBaseUrl;
|
|
17
|
-
constructor();
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
constructor(logger?: Logger);
|
|
18
|
+
getTokenInfo(): IToken;
|
|
19
|
+
/**
|
|
20
|
+
* 设置服务器地址
|
|
21
|
+
*
|
|
22
|
+
* @param { object } options - 包含基本URL和日志URL的对象。
|
|
23
|
+
* @property { string } options.baseUrl - 服务器的基本URL。
|
|
24
|
+
* @property { string } options.logUrl - 日志服务器的URL。
|
|
25
|
+
*/
|
|
26
|
+
setBaseUrl({ baseUrl, logUrl }: {
|
|
27
|
+
baseUrl?: string;
|
|
28
|
+
logUrl?: string;
|
|
29
|
+
}): void;
|
|
30
|
+
/**
|
|
31
|
+
* 设置API网关校验信息
|
|
32
|
+
*
|
|
33
|
+
* @param { object } options - API网关校验信息
|
|
34
|
+
* @property { string } options.clientId - 网关校验
|
|
35
|
+
* @property { string } options.clientSecret - 网关密钥
|
|
36
|
+
*/
|
|
20
37
|
setClientInfo({ clientId, clientSecret }: {
|
|
21
38
|
clientId: string;
|
|
22
39
|
clientSecret: string;
|
|
23
40
|
}): void;
|
|
24
|
-
|
|
41
|
+
/**
|
|
42
|
+
* 设置会议相关会议,用于后续请求
|
|
43
|
+
*
|
|
44
|
+
* @param { IMeetingInfo } info - 会议相关信息
|
|
45
|
+
*/
|
|
25
46
|
setMeetingInfo(info: IMeetingInfo): void;
|
|
47
|
+
/**
|
|
48
|
+
* 设置token相关信息
|
|
49
|
+
*
|
|
50
|
+
* @param { IToken | null } tokenInfo - token信息
|
|
51
|
+
*/
|
|
26
52
|
setTokenInfo(tokenInfo: IToken | null): void;
|
|
27
|
-
|
|
53
|
+
/**
|
|
54
|
+
* 设置默认参数
|
|
55
|
+
*
|
|
56
|
+
* @param { ICommonParams } data - 参数
|
|
57
|
+
* @property { string } data.securityKey - securityKey
|
|
58
|
+
*/
|
|
59
|
+
setCommonParams(data: ICommonParams): void;
|
|
28
60
|
/**
|
|
29
61
|
* 日志上传
|
|
30
62
|
*
|
|
31
63
|
* @param data
|
|
32
64
|
* @returns
|
|
33
65
|
*/
|
|
34
|
-
|
|
66
|
+
uploadLog(data: any): Promise<any>;
|
|
35
67
|
/**
|
|
36
68
|
* 不加密登录
|
|
37
69
|
*
|
|
@@ -60,21 +92,22 @@ declare class Action {
|
|
|
60
92
|
/**
|
|
61
93
|
* 获取云会议室信息
|
|
62
94
|
*
|
|
95
|
+
* 3.10_20240214 根据能力集更换成新的接口, 原接口:/api/rest/uss/v4/callUrlInfoV2,
|
|
96
|
+
*
|
|
63
97
|
* @param { Object } params
|
|
64
98
|
* @param { string } number 会议号
|
|
65
|
-
* @param { string } deviceType 设备类型
|
|
66
99
|
* @param { string } country 国际化
|
|
67
|
-
*
|
|
68
100
|
* @returns
|
|
69
101
|
*/
|
|
70
102
|
getCallUri(params: {
|
|
71
103
|
number: string;
|
|
72
|
-
|
|
73
|
-
country: string;
|
|
104
|
+
country?: string;
|
|
74
105
|
}): Promise<any>;
|
|
75
106
|
/**
|
|
76
107
|
* 校验会议室密码
|
|
77
108
|
*
|
|
109
|
+
* 3.10_20240214 更换成新的接口, 原接口:/api/rest/uss/v4/en/cloudmeeting/validation
|
|
110
|
+
*
|
|
78
111
|
* @param { string } confNumber 会议号
|
|
79
112
|
* @param { string } password 密码
|
|
80
113
|
* @returns
|
|
@@ -93,11 +126,12 @@ declare class Action {
|
|
|
93
126
|
/**
|
|
94
127
|
* 获取i18n/errorcode等链接
|
|
95
128
|
*
|
|
129
|
+
* @deprecated
|
|
96
130
|
* @returns
|
|
97
131
|
*/
|
|
98
132
|
getDefaultServerConfig(): Promise<any>;
|
|
99
133
|
/**
|
|
100
|
-
* 批量获取serverConfig
|
|
134
|
+
* 批量获取serverConfig, 获取错误码/i18n等json链接
|
|
101
135
|
*
|
|
102
136
|
* @param {string[]} includeConfigNameList 需要的配置key值
|
|
103
137
|
* @returns
|
|
@@ -147,6 +181,8 @@ declare class Action {
|
|
|
147
181
|
/**
|
|
148
182
|
* 获取会议室水印
|
|
149
183
|
*
|
|
184
|
+
* 3.10_20240214 根据能力集更换成新的接口, 原接口:/api/rest/v1/meetingroom/conferenceNumber/watermarkContent/{conferenceNumber}
|
|
185
|
+
*
|
|
150
186
|
* @param { string } conferenceNumber 会议号
|
|
151
187
|
* @returns
|
|
152
188
|
*/
|
|
@@ -230,7 +266,7 @@ declare class Action {
|
|
|
230
266
|
*/
|
|
231
267
|
getEnterpriseMediaConfig(userId: number, config: IMediaConfigParam[]): Promise<any>;
|
|
232
268
|
/**
|
|
233
|
-
* 获取企业相关配置(buffet),
|
|
269
|
+
* 获取企业相关配置(buffet), 包含头像配置、禁用语音转写英文翻译
|
|
234
270
|
*
|
|
235
271
|
* @param { number } userId 用户ID
|
|
236
272
|
* @returns
|
|
@@ -246,14 +282,17 @@ declare class Action {
|
|
|
246
282
|
/**
|
|
247
283
|
* 获取会议邀请链接信息
|
|
248
284
|
*
|
|
249
|
-
*
|
|
285
|
+
* 3.10_20240214 更换接口, 原接口:/page/client/shareConference/infomation
|
|
250
286
|
*
|
|
287
|
+
* @param { IMeetingInviteParams } params 邀请链接请求参数
|
|
251
288
|
* @returns
|
|
252
289
|
*/
|
|
253
290
|
getMeetingInviteInfo(params: IMeetingInviteParams): Promise<any>;
|
|
254
291
|
/**
|
|
255
292
|
* 获取个人云会议室信息,包含入会密码和个人云会议室号
|
|
256
293
|
*
|
|
294
|
+
* 3.10_20240214 更换接口, 原接口:/api/rest/v3/en/user/${userId}/cloudMeetingRooms
|
|
295
|
+
*
|
|
257
296
|
* @param { number } userId 用户ID
|
|
258
297
|
* @returns
|
|
259
298
|
*/
|
|
@@ -261,6 +300,8 @@ declare class Action {
|
|
|
261
300
|
/**
|
|
262
301
|
* 获取参会者头像
|
|
263
302
|
*
|
|
303
|
+
* 3.10_20240214 更换接口, 原接口:/api/rest/v4/en/incomingcallUrlInfo
|
|
304
|
+
*
|
|
264
305
|
* @param { string } callUrl 待获取头像的参会者callUri
|
|
265
306
|
* @returns
|
|
266
307
|
*/
|
|
@@ -275,6 +316,47 @@ declare class Action {
|
|
|
275
316
|
* @returns
|
|
276
317
|
*/
|
|
277
318
|
sendVideoControlResult(type: 'muteVideo' | 'unMuteVideo', value: string): Promise<any>;
|
|
319
|
+
/**
|
|
320
|
+
* 签到
|
|
321
|
+
*
|
|
322
|
+
* @param { Object } params - 参数
|
|
323
|
+
* @param { string } params.deviceId - 用户ID
|
|
324
|
+
* @param { string } params.questionnaireId - 签到ID
|
|
325
|
+
* @returns
|
|
326
|
+
*/
|
|
327
|
+
signIn({ deviceId, questionnaireId }: {
|
|
328
|
+
deviceId: string;
|
|
329
|
+
questionnaireId: string;
|
|
330
|
+
}): Promise<any>;
|
|
331
|
+
/**
|
|
332
|
+
* 校验会控主持密码
|
|
333
|
+
*
|
|
334
|
+
* @param { string } pwd - 参数
|
|
335
|
+
* @returns
|
|
336
|
+
*/
|
|
337
|
+
verifyControlPassword(pwd: string): Promise<any>;
|
|
338
|
+
/**
|
|
339
|
+
* 终端获取签到答题等文案
|
|
340
|
+
*
|
|
341
|
+
* @param { Object } params - 参数
|
|
342
|
+
* @param { EVENT_TYPE } type - 业务状态
|
|
343
|
+
* @param { number } businessType - 业务类型
|
|
344
|
+
* @param { string } environment - 语言,中文:zh-cn 、英文:en、台湾:zh-tw、香港:zh-hk
|
|
345
|
+
* @returns
|
|
346
|
+
*/
|
|
347
|
+
getSignInText({ type, environment, businessType }: SignInTextParams): Promise<any>;
|
|
348
|
+
/**
|
|
349
|
+
* 授权码登录
|
|
350
|
+
*
|
|
351
|
+
* @param { ILoginWidthAuthCode } params 参数
|
|
352
|
+
* @param {string} params.extID 企业id
|
|
353
|
+
* @param {string} params.extUserId 用户id
|
|
354
|
+
* @param {string} params.displayName 用户名称
|
|
355
|
+
* @param {string} params.oauthCode 授权码
|
|
356
|
+
* @param {boolean} params.isTempUser 是否临时账户
|
|
357
|
+
* @param {string} params.channelId 渠道id
|
|
358
|
+
* @returns
|
|
359
|
+
*/
|
|
278
360
|
loginWithAuthCode({ extId, extUserId, displayName, oauthCode, isTempUser, channelId }: {
|
|
279
361
|
extId: string;
|
|
280
362
|
extUserId: string;
|
|
@@ -292,11 +374,13 @@ declare class Action {
|
|
|
292
374
|
*/
|
|
293
375
|
loginWithUnified(loginType: LoginType, data: LoginParams): Promise<any>;
|
|
294
376
|
/**
|
|
295
|
-
*
|
|
377
|
+
* 获取能力集
|
|
296
378
|
*
|
|
297
|
-
* @param {
|
|
379
|
+
* @param { number[] } localAbilities - 终端能力集
|
|
380
|
+
* @returns { number[] } abilityList - 服务端能力集
|
|
298
381
|
*/
|
|
299
|
-
|
|
382
|
+
getAbility(localAbilities?: number[]): Promise<any>;
|
|
383
|
+
endAllMeeting(): Promise<any>;
|
|
300
384
|
/**
|
|
301
385
|
* 获取公钥,加密登录需使用此公钥
|
|
302
386
|
*
|
|
@@ -312,5 +396,4 @@ declare class Action {
|
|
|
312
396
|
*/
|
|
313
397
|
private customLogin;
|
|
314
398
|
}
|
|
315
|
-
|
|
316
|
-
export default _default;
|
|
399
|
+
export default Action;
|
package/lib/enum/client.d.ts
CHANGED
package/lib/enum/device.d.ts
CHANGED
|
@@ -1,4 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 参会设备类型枚举
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2023-10-11 11:18:34
|
|
5
|
+
* Last modified : 2023-11-09 10:01:03
|
|
6
|
+
*/
|
|
1
7
|
export declare const DEVICE_TYPE_MAP: {
|
|
2
8
|
[key: string]: string;
|
|
3
9
|
};
|
|
4
10
|
export declare const HARD_DEVICE_TYPE_LIST: string[];
|
|
11
|
+
/**
|
|
12
|
+
* 设备列表默认值
|
|
13
|
+
*/
|
|
14
|
+
export declare const DEFAULT_DEVICE_LIST: {
|
|
15
|
+
audioInputList: never[];
|
|
16
|
+
audioOutputList: never[];
|
|
17
|
+
videoInputList: never[];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 设备ID默认值
|
|
21
|
+
*/
|
|
22
|
+
export declare const INIT_DEVICES_ID: {
|
|
23
|
+
audioInput: string;
|
|
24
|
+
audioOutput: string;
|
|
25
|
+
videoInput: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* 浏览器系统默认ID
|
|
29
|
+
*/
|
|
30
|
+
export declare const DEFAULT_BROWSER_DEVICE_ID = "default";
|
|
31
|
+
/**
|
|
32
|
+
* 系统默认BaseDevice
|
|
33
|
+
*/
|
|
34
|
+
export declare const BASE_DEVICE: {
|
|
35
|
+
deviceId: string;
|
|
36
|
+
label: string;
|
|
37
|
+
groupId: string;
|
|
38
|
+
};
|
package/lib/enum/errorCode.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebRTC SDK 统一错误码集合
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2023-10-11 11:18:07
|
|
5
|
+
* Last modified : 2023-11-03 11:24:20
|
|
6
|
+
*/
|
|
1
7
|
import { TLocale } from '../type';
|
|
2
8
|
export declare const SERVER_ERROR_CODE_MAP: {
|
|
3
|
-
[key: number]: string;
|
|
9
|
+
[key: number | string]: string;
|
|
4
10
|
};
|
|
5
11
|
/**
|
|
6
12
|
* 代码错误提示
|
package/lib/enum/i18n.d.ts
CHANGED
package/lib/enum/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* WEBRTC SDK ENUM TYPE
|
|
3
3
|
*
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-10-30 14:12:52
|
|
6
6
|
*/
|
|
7
|
-
import { IDefault, IOPERATE_MAP,
|
|
8
|
-
export * from './
|
|
7
|
+
import { IDefault, IOPERATE_MAP, IRoster, IFeatureConfig, StreamStatus, StreamType, ILoggerConfig, FacingMode, StreamResolution, TemplateMode, ContentTemplateMode, IMediaConfig, IMackCall } from '../type';
|
|
8
|
+
export * from './constraints';
|
|
9
9
|
export declare const LOG_CACHE_COUNT = 10;
|
|
10
10
|
export declare const DB_TABLE_COUNT = 10;
|
|
11
11
|
export declare const DETECT_LOCATOR_SERVER_NAME = "WebrtcSigGW";
|
|
@@ -61,6 +61,10 @@ export declare const RESOLUTION_TYPE: number[];
|
|
|
61
61
|
* 每页最大显示终端数
|
|
62
62
|
*/
|
|
63
63
|
export declare const MAX_PAGE_SIZE = 9;
|
|
64
|
+
/**
|
|
65
|
+
* 移动端 对称布局 最大请流数量
|
|
66
|
+
*/
|
|
67
|
+
export declare const MAX_MOBILE_PAGE_SIZE = 6;
|
|
64
68
|
/**
|
|
65
69
|
* 网络信息
|
|
66
70
|
*/
|
|
@@ -87,21 +91,21 @@ export declare const DEFAULT_ROSTER: IRoster;
|
|
|
87
91
|
*/
|
|
88
92
|
export declare const DEFAULT: IDefault;
|
|
89
93
|
/**
|
|
90
|
-
*
|
|
94
|
+
* 非content 默认模版类型数组
|
|
91
95
|
*/
|
|
92
|
-
export declare const
|
|
96
|
+
export declare const TEMPLATE_MODE_LIST: TemplateMode[];
|
|
93
97
|
/**
|
|
94
|
-
* content
|
|
98
|
+
* content 模板类型数组
|
|
95
99
|
*/
|
|
96
|
-
export declare const
|
|
100
|
+
export declare const CONTENT_TEMPLATE_MODE_LIST: ContentTemplateMode[];
|
|
97
101
|
/**
|
|
98
102
|
* 非content 默认模板类型
|
|
99
103
|
*/
|
|
100
|
-
export declare const TEMPLATE_DEFAULT_MODE =
|
|
104
|
+
export declare const TEMPLATE_DEFAULT_MODE = TemplateMode.SPEAKER;
|
|
101
105
|
/**
|
|
102
106
|
* content 模板类型
|
|
103
107
|
*/
|
|
104
|
-
export declare const CONTENT_DEFAULT_TEMPLATE_MODE =
|
|
108
|
+
export declare const CONTENT_DEFAULT_TEMPLATE_MODE = ContentTemplateMode.MULTI_PIC_CONTENT_HIGH_PRIORITY;
|
|
105
109
|
/**
|
|
106
110
|
* 用户类型
|
|
107
111
|
*/
|
|
@@ -157,6 +161,14 @@ export declare const DEF_DB_VERSION = 1;
|
|
|
157
161
|
* 默认数据表的起始索引序列
|
|
158
162
|
*/
|
|
159
163
|
export declare const DEF_TABLE_INDEX = 1;
|
|
164
|
+
/**
|
|
165
|
+
* 需要过滤的最小声量数据
|
|
166
|
+
*/
|
|
167
|
+
export declare const MIN_AUDIO_LEVEL = 4;
|
|
168
|
+
/**
|
|
169
|
+
* 声量设备缓存时间
|
|
170
|
+
*/
|
|
171
|
+
export declare const SPEAKER_KEEP_INTERVAL = 3000;
|
|
160
172
|
/**
|
|
161
173
|
* 默认数据库配置
|
|
162
174
|
*/
|
|
@@ -168,9 +180,10 @@ export declare const FACING_MODE_LIST: readonly [FacingMode.FRONT, FacingMode.BA
|
|
|
168
180
|
/**
|
|
169
181
|
* 企业配置信息
|
|
170
182
|
*
|
|
171
|
-
* @property downLinkCeilingRate 下行带宽配置
|
|
172
|
-
* @property upLinkCeilingRate 上行带宽配置(暂不支持)
|
|
173
|
-
* @property pvrxResolution
|
|
183
|
+
* @property downLinkCeilingRate - 下行带宽配置
|
|
184
|
+
* @property upLinkCeilingRate - 上行带宽配置(暂不支持)
|
|
185
|
+
* @property pvrxResolution - 下行最大分辨率配置
|
|
186
|
+
* @property pvtxResolution - 上行最大分辨率配置
|
|
174
187
|
*/
|
|
175
188
|
export declare const ENTERPRISE_CONFIG: {
|
|
176
189
|
downLinkCeilingRate: {
|
|
@@ -185,6 +198,10 @@ export declare const ENTERPRISE_CONFIG: {
|
|
|
185
198
|
clientConfigName: string;
|
|
186
199
|
configName: string;
|
|
187
200
|
};
|
|
201
|
+
pvtxResolution: {
|
|
202
|
+
clientConfigName: string;
|
|
203
|
+
configName: string;
|
|
204
|
+
};
|
|
188
205
|
};
|
|
189
206
|
/**
|
|
190
207
|
* 枚举会控平台
|
|
@@ -195,3 +212,44 @@ export declare const MEETING_CONTROL_PLATFORM: {
|
|
|
195
212
|
SIDE: string;
|
|
196
213
|
PROFESSIONAL: string;
|
|
197
214
|
};
|
|
215
|
+
/**
|
|
216
|
+
* Content的分组ID
|
|
217
|
+
*/
|
|
218
|
+
export declare const CONTENT_MEDIAGROUP_ID = "1";
|
|
219
|
+
/**
|
|
220
|
+
* 高分辨率配置
|
|
221
|
+
*/
|
|
222
|
+
export declare const HIGH_RESOLUTION = StreamResolution.RS1080;
|
|
223
|
+
/**
|
|
224
|
+
* 流畅模式下视频发送和接收配置
|
|
225
|
+
*
|
|
226
|
+
* 理论上,如果需要配置带宽配置,不应该启用配置流畅模式
|
|
227
|
+
*
|
|
228
|
+
* 注意:可能出现NConsole配置的比流畅模式还低的情况,这种情况可以暂时忽略,不做考虑
|
|
229
|
+
* people默认发送和接收360P画面
|
|
230
|
+
* content模式发送和接收720P画面
|
|
231
|
+
* 后期如果觉得不太合适,可以随时调整此配置
|
|
232
|
+
*/
|
|
233
|
+
export declare const SM_CONFIG: {
|
|
234
|
+
peopleRecResolution: StreamResolution;
|
|
235
|
+
peopleSendResolution: StreamResolution;
|
|
236
|
+
contentRecResolution: StreamResolution;
|
|
237
|
+
contentSendResolution: StreamResolution;
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* 默认SDK视频发送和接收配置
|
|
241
|
+
*/
|
|
242
|
+
export declare const NM_CONFIG: {
|
|
243
|
+
peopleRecResolution: StreamResolution;
|
|
244
|
+
peopleSendResolution: StreamResolution;
|
|
245
|
+
contentRecResolution: StreamResolution;
|
|
246
|
+
contentSendResolution: StreamResolution;
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* 默认媒体配置表
|
|
250
|
+
*/
|
|
251
|
+
export declare const DEFAULT_MEDIA_CONFIG: IMediaConfig;
|
|
252
|
+
/**
|
|
253
|
+
* makeCall呼叫默认参数
|
|
254
|
+
*/
|
|
255
|
+
export declare const DEFAULT_MAKE_CALL_PARAMS: IMackCall;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './speaker';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature:实时讲话人功能
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2023-09-26 15:12:40
|
|
5
|
+
* Last modified : 2023-10-11 11:31:09
|
|
6
|
+
*/
|
|
7
|
+
import { SpeakersInfoObj } from '../type';
|
|
8
|
+
import Client from '../main/client';
|
|
9
|
+
import Logger from '../tools/log/logger';
|
|
10
|
+
export declare class Speaker {
|
|
11
|
+
logger: Logger;
|
|
12
|
+
private client;
|
|
13
|
+
private cacheSpeakerList;
|
|
14
|
+
private cacheRemoteSpeakerList;
|
|
15
|
+
private speakerListJson;
|
|
16
|
+
private speakerListTimer;
|
|
17
|
+
private speakerInterval;
|
|
18
|
+
private speakerTimestamp;
|
|
19
|
+
private speakerInternalMap;
|
|
20
|
+
constructor(client: Client);
|
|
21
|
+
/**
|
|
22
|
+
* 获取实时讲话人列表数据
|
|
23
|
+
*/
|
|
24
|
+
getRemoteSpeakerList(): SpeakersInfoObj[];
|
|
25
|
+
/**
|
|
26
|
+
* 处理实时讲话人信息
|
|
27
|
+
*
|
|
28
|
+
* @param { SpeakersInfoObj[] } param - 接收到的远端speakers消息内容
|
|
29
|
+
*/
|
|
30
|
+
onSpeakerListMessage(data?: SpeakersInfoObj[]): void;
|
|
31
|
+
/**
|
|
32
|
+
* 删除无效的讲话人信息
|
|
33
|
+
*/
|
|
34
|
+
private deleteInvalidSpeakerMap;
|
|
35
|
+
/**
|
|
36
|
+
* 启动定时器针对SpeakerList做处理
|
|
37
|
+
*/
|
|
38
|
+
private startSpeakerListTimer;
|
|
39
|
+
/**
|
|
40
|
+
* 创建Analyser分析器,计算所有通道音量大小
|
|
41
|
+
*
|
|
42
|
+
* 1、缓存对应每个人的MediaStream数据
|
|
43
|
+
* 2、获取每个人的实时音量大小
|
|
44
|
+
* 3、排序、推送排序的数据
|
|
45
|
+
*/
|
|
46
|
+
private updateSpeakerAudioLevel;
|
|
47
|
+
/**
|
|
48
|
+
* 基于合并后的SpeakerList做过滤和声量排序操作
|
|
49
|
+
*/
|
|
50
|
+
private sortSpeakerAudioLevel;
|
|
51
|
+
/**
|
|
52
|
+
* 推送实时讲话人信息
|
|
53
|
+
*
|
|
54
|
+
* @param { SpeakersInfoObj[] } speakerList - 说话人信息
|
|
55
|
+
*/
|
|
56
|
+
private emitSpeakerList;
|
|
57
|
+
/**
|
|
58
|
+
* 清除Speaker Timer和其他缓存数据
|
|
59
|
+
*/
|
|
60
|
+
destroy(): void;
|
|
61
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
7
7
|
* @date 2019-10-14 18:20:28
|
|
8
8
|
*/
|
|
9
|
-
import { IClientConfig,
|
|
9
|
+
import { IClientConfig, TLocale, ICheckSystemRequirements } from './type';
|
|
10
10
|
import DeviceManager from './main/deviceManager';
|
|
11
|
-
import Logger from './tools/logger';
|
|
11
|
+
import Logger from './tools/log/logger';
|
|
12
12
|
import Client from './main/client';
|
|
13
13
|
import Stream from './main/stream';
|
|
14
14
|
import { getVideoInfoByRotation, getSendSupportedCodec, getLayoutRotateInfo, getLayoutItemState, detectLocator } from './main/helper';
|
|
15
|
+
import BrowserDetector from './tools/browser';
|
|
16
|
+
import LogManager from './tools/log/loggerManager';
|
|
15
17
|
/**
|
|
16
18
|
* XYLink WebRTC SDK 操作入口
|
|
17
19
|
*/
|
|
@@ -19,19 +21,20 @@ interface XYLinkRTC {
|
|
|
19
21
|
version: string;
|
|
20
22
|
client: Client | null;
|
|
21
23
|
logger: Logger;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
create: (config: IClientConfig, logger?: Logger) => {
|
|
25
|
+
client: Client;
|
|
26
|
+
stream: Stream;
|
|
27
|
+
};
|
|
24
28
|
checkSupportWebRTC: () => Promise<ICheckSystemRequirements>;
|
|
25
29
|
checkSupportMobileWebRTC: () => Promise<ICheckSystemRequirements>;
|
|
26
30
|
checkSupportShareContent: () => boolean;
|
|
27
31
|
setLocale: (language: TLocale) => void;
|
|
28
|
-
|
|
29
|
-
closePreviewStream: (stream: MediaStream) => void;
|
|
30
|
-
setOutputAudioDevice: (element: HTMLMediaElement, outputValue: string) => void;
|
|
32
|
+
setOutputAudioDevice: (element: HTMLMediaElement, outputValue: string) => Promise<void>;
|
|
31
33
|
render: void;
|
|
32
34
|
}
|
|
33
|
-
declare const
|
|
34
|
-
export default
|
|
35
|
-
export { Client, Stream, Logger, DeviceManager, getLayoutItemState, getVideoInfoByRotation
|
|
35
|
+
declare const XYRTC: XYLinkRTC;
|
|
36
|
+
export default XYRTC;
|
|
37
|
+
export { Client, Stream, Logger, LogManager, DeviceManager, getLayoutItemState, getVideoInfoByRotation, getLayoutRotateInfo, getSendSupportedCodec, detectLocator };
|
|
36
38
|
export * from './type';
|
|
37
39
|
export { ERROR_CODE } from './enum/errorCode';
|
|
40
|
+
export { BrowserDetector };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AbilityResult } from '../../type';
|
|
2
|
+
import Client from '../client';
|
|
3
|
+
declare class Ability {
|
|
4
|
+
private abilityResult;
|
|
5
|
+
private logger;
|
|
6
|
+
private action;
|
|
7
|
+
constructor(client: Client);
|
|
8
|
+
static instance: Ability | null;
|
|
9
|
+
static createInstance(client: Client): Ability;
|
|
10
|
+
/**
|
|
11
|
+
* 获取终端和服务端接口是否可用的能力集
|
|
12
|
+
*
|
|
13
|
+
* @returns { AbilityResult } - 能力结果集
|
|
14
|
+
*/
|
|
15
|
+
getAbilityResult(): AbilityResult;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
/**
|
|
18
|
+
* 获取能力集
|
|
19
|
+
*
|
|
20
|
+
* @returns { Promise<AbilityResult> } - 能力结果集
|
|
21
|
+
*/
|
|
22
|
+
private fetchAbilityInfo;
|
|
23
|
+
/**
|
|
24
|
+
* 根据十进制数值计算能力集
|
|
25
|
+
*
|
|
26
|
+
* @param { number[] } abilities - 能力对应的数值
|
|
27
|
+
* @returns { AbilityResult } - 能力结果集
|
|
28
|
+
*/
|
|
29
|
+
private calculateAbilities;
|
|
30
|
+
}
|
|
31
|
+
export default Ability;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 登录模块
|
|
3
|
-
*
|
|
4
3
|
*/
|
|
5
|
-
import { ILoginExtAccount, ISdkUserInfo, ILoginInfo, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams
|
|
6
|
-
import
|
|
7
|
-
declare class
|
|
4
|
+
import { ILoginExtAccount, ISdkUserInfo, ILoginInfo, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams } from '../type';
|
|
5
|
+
import Client from './client';
|
|
6
|
+
declare class Auth {
|
|
8
7
|
private logger;
|
|
8
|
+
private action;
|
|
9
9
|
private loginInfo;
|
|
10
|
-
private
|
|
11
|
-
constructor(
|
|
10
|
+
private extId;
|
|
11
|
+
constructor(client: Client);
|
|
12
12
|
getLoginInfo(): ILoginInfo;
|
|
13
13
|
setLoginInfo(loginInfo: ILoginInfo): void;
|
|
14
|
-
setExtInfo(info: ExtInfo): void;
|
|
15
14
|
/**
|
|
16
15
|
* 第三方账号登录 - 旧方法
|
|
17
16
|
*
|
|
@@ -20,6 +19,7 @@ declare class IAuth {
|
|
|
20
19
|
* @param { string } params.displayName 用户名称
|
|
21
20
|
* @param { string } params.extId 企业id
|
|
22
21
|
* @param { string? } params.extUserId 三方用户ID
|
|
22
|
+
* @param { boolean? } params.tempUser 是否是临时账号 v3.9.2新增
|
|
23
23
|
* @return
|
|
24
24
|
*/
|
|
25
25
|
loginExternalAccount(params: ILoginExtAccount): Promise<import("../type").IReturnResult>;
|
|
@@ -88,4 +88,4 @@ declare class IAuth {
|
|
|
88
88
|
*/
|
|
89
89
|
private verifyExtUserId;
|
|
90
90
|
}
|
|
91
|
-
export default
|
|
91
|
+
export default Auth;
|