@xylink/xy-rtc-sdk 3.9.1 → 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 +101 -19
- 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 +60 -6
- 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 +11 -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 +191 -99
- 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 +67 -31
- 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 +2 -0
- 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/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 +154 -74
- package/lib/type/device.d.ts +103 -31
- package/lib/type/index.d.ts +3 -1
- package/lib/type/layout.d.ts +34 -0
- 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 +20 -12
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +7 -5
- /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
|
|
@@ -148,6 +181,8 @@ declare class Action {
|
|
|
148
181
|
/**
|
|
149
182
|
* 获取会议室水印
|
|
150
183
|
*
|
|
184
|
+
* 3.10_20240214 根据能力集更换成新的接口, 原接口:/api/rest/v1/meetingroom/conferenceNumber/watermarkContent/{conferenceNumber}
|
|
185
|
+
*
|
|
151
186
|
* @param { string } conferenceNumber 会议号
|
|
152
187
|
* @returns
|
|
153
188
|
*/
|
|
@@ -231,7 +266,7 @@ declare class Action {
|
|
|
231
266
|
*/
|
|
232
267
|
getEnterpriseMediaConfig(userId: number, config: IMediaConfigParam[]): Promise<any>;
|
|
233
268
|
/**
|
|
234
|
-
* 获取企业相关配置(buffet),
|
|
269
|
+
* 获取企业相关配置(buffet), 包含头像配置、禁用语音转写英文翻译
|
|
235
270
|
*
|
|
236
271
|
* @param { number } userId 用户ID
|
|
237
272
|
* @returns
|
|
@@ -247,14 +282,17 @@ declare class Action {
|
|
|
247
282
|
/**
|
|
248
283
|
* 获取会议邀请链接信息
|
|
249
284
|
*
|
|
250
|
-
*
|
|
285
|
+
* 3.10_20240214 更换接口, 原接口:/page/client/shareConference/infomation
|
|
251
286
|
*
|
|
287
|
+
* @param { IMeetingInviteParams } params 邀请链接请求参数
|
|
252
288
|
* @returns
|
|
253
289
|
*/
|
|
254
290
|
getMeetingInviteInfo(params: IMeetingInviteParams): Promise<any>;
|
|
255
291
|
/**
|
|
256
292
|
* 获取个人云会议室信息,包含入会密码和个人云会议室号
|
|
257
293
|
*
|
|
294
|
+
* 3.10_20240214 更换接口, 原接口:/api/rest/v3/en/user/${userId}/cloudMeetingRooms
|
|
295
|
+
*
|
|
258
296
|
* @param { number } userId 用户ID
|
|
259
297
|
* @returns
|
|
260
298
|
*/
|
|
@@ -262,6 +300,8 @@ declare class Action {
|
|
|
262
300
|
/**
|
|
263
301
|
* 获取参会者头像
|
|
264
302
|
*
|
|
303
|
+
* 3.10_20240214 更换接口, 原接口:/api/rest/v4/en/incomingcallUrlInfo
|
|
304
|
+
*
|
|
265
305
|
* @param { string } callUrl 待获取头像的参会者callUri
|
|
266
306
|
* @returns
|
|
267
307
|
*/
|
|
@@ -276,6 +316,47 @@ declare class Action {
|
|
|
276
316
|
* @returns
|
|
277
317
|
*/
|
|
278
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
|
+
*/
|
|
279
360
|
loginWithAuthCode({ extId, extUserId, displayName, oauthCode, isTempUser, channelId }: {
|
|
280
361
|
extId: string;
|
|
281
362
|
extUserId: string;
|
|
@@ -293,11 +374,13 @@ declare class Action {
|
|
|
293
374
|
*/
|
|
294
375
|
loginWithUnified(loginType: LoginType, data: LoginParams): Promise<any>;
|
|
295
376
|
/**
|
|
296
|
-
*
|
|
377
|
+
* 获取能力集
|
|
297
378
|
*
|
|
298
|
-
* @param {
|
|
379
|
+
* @param { number[] } localAbilities - 终端能力集
|
|
380
|
+
* @returns { number[] } abilityList - 服务端能力集
|
|
299
381
|
*/
|
|
300
|
-
|
|
382
|
+
getAbility(localAbilities?: number[]): Promise<any>;
|
|
383
|
+
endAllMeeting(): Promise<any>;
|
|
301
384
|
/**
|
|
302
385
|
* 获取公钥,加密登录需使用此公钥
|
|
303
386
|
*
|
|
@@ -313,5 +396,4 @@ declare class Action {
|
|
|
313
396
|
*/
|
|
314
397
|
private customLogin;
|
|
315
398
|
}
|
|
316
|
-
|
|
317
|
-
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, IRoster, IFeatureConfig, StreamStatus, StreamType, ILoggerConfig, FacingMode, TemplateMode, ContentTemplateMode } from '../type';
|
|
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";
|
|
@@ -161,6 +161,14 @@ export declare const DEF_DB_VERSION = 1;
|
|
|
161
161
|
* 默认数据表的起始索引序列
|
|
162
162
|
*/
|
|
163
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;
|
|
164
172
|
/**
|
|
165
173
|
* 默认数据库配置
|
|
166
174
|
*/
|
|
@@ -172,9 +180,10 @@ export declare const FACING_MODE_LIST: readonly [FacingMode.FRONT, FacingMode.BA
|
|
|
172
180
|
/**
|
|
173
181
|
* 企业配置信息
|
|
174
182
|
*
|
|
175
|
-
* @property downLinkCeilingRate 下行带宽配置
|
|
176
|
-
* @property upLinkCeilingRate 上行带宽配置(暂不支持)
|
|
177
|
-
* @property pvrxResolution
|
|
183
|
+
* @property downLinkCeilingRate - 下行带宽配置
|
|
184
|
+
* @property upLinkCeilingRate - 上行带宽配置(暂不支持)
|
|
185
|
+
* @property pvrxResolution - 下行最大分辨率配置
|
|
186
|
+
* @property pvtxResolution - 上行最大分辨率配置
|
|
178
187
|
*/
|
|
179
188
|
export declare const ENTERPRISE_CONFIG: {
|
|
180
189
|
downLinkCeilingRate: {
|
|
@@ -189,6 +198,10 @@ export declare const ENTERPRISE_CONFIG: {
|
|
|
189
198
|
clientConfigName: string;
|
|
190
199
|
configName: string;
|
|
191
200
|
};
|
|
201
|
+
pvtxResolution: {
|
|
202
|
+
clientConfigName: string;
|
|
203
|
+
configName: string;
|
|
204
|
+
};
|
|
192
205
|
};
|
|
193
206
|
/**
|
|
194
207
|
* 枚举会控平台
|
|
@@ -199,3 +212,44 @@ export declare const MEETING_CONTROL_PLATFORM: {
|
|
|
199
212
|
SIDE: string;
|
|
200
213
|
PROFESSIONAL: string;
|
|
201
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,13 +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
15
|
import BrowserDetector from './tools/browser';
|
|
16
|
+
import LogManager from './tools/log/loggerManager';
|
|
16
17
|
/**
|
|
17
18
|
* XYLink WebRTC SDK 操作入口
|
|
18
19
|
*/
|
|
@@ -20,20 +21,20 @@ interface XYLinkRTC {
|
|
|
20
21
|
version: string;
|
|
21
22
|
client: Client | null;
|
|
22
23
|
logger: Logger;
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
create: (config: IClientConfig, logger?: Logger) => {
|
|
25
|
+
client: Client;
|
|
26
|
+
stream: Stream;
|
|
27
|
+
};
|
|
25
28
|
checkSupportWebRTC: () => Promise<ICheckSystemRequirements>;
|
|
26
29
|
checkSupportMobileWebRTC: () => Promise<ICheckSystemRequirements>;
|
|
27
30
|
checkSupportShareContent: () => boolean;
|
|
28
31
|
setLocale: (language: TLocale) => void;
|
|
29
|
-
|
|
30
|
-
closePreviewStream: (stream: MediaStream) => void;
|
|
31
|
-
setOutputAudioDevice: (element: HTMLMediaElement, outputValue: string) => void;
|
|
32
|
+
setOutputAudioDevice: (element: HTMLMediaElement, outputValue: string) => Promise<void>;
|
|
32
33
|
render: void;
|
|
33
34
|
}
|
|
34
|
-
declare const
|
|
35
|
-
export default
|
|
36
|
-
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 };
|
|
37
38
|
export * from './type';
|
|
38
39
|
export { ERROR_CODE } from './enum/errorCode';
|
|
39
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;
|