@xylink/xy-rtc-sdk 3.9.11-private.6 → 100.0.0-beta.33
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/README.MD +30 -12
- package/lib/action/index.d.ts +102 -36
- package/lib/enum/analyser.d.ts +7 -0
- package/lib/enum/client.d.ts +8 -2
- package/lib/enum/constraints.d.ts +51 -0
- package/lib/enum/device.d.ts +28 -0
- package/lib/enum/errorCode.d.ts +8 -2
- package/lib/enum/i18n.d.ts +6 -0
- package/lib/enum/index.d.ts +89 -6
- package/lib/enum/meeting.d.ts +4 -0
- package/lib/enum/polling.d.ts +2 -11
- package/lib/feature/customMessage/index.d.ts +29 -0
- package/lib/feature/edu/index.d.ts +34 -0
- package/lib/feature/edu/index.type.d.ts +29 -0
- package/lib/feature/index.d.ts +3 -0
- package/lib/feature/speaker/index.d.ts +81 -0
- package/lib/feature/speaker/index.type.d.ts +17 -0
- package/lib/index.d.ts +67 -31
- package/lib/interface/baseModule.type.d.ts +9 -0
- package/lib/interface/clientInterface.type.d.ts +83 -0
- package/lib/interface/contentTrackInterface.type.d.ts +15 -0
- package/lib/interface/event.type.d.ts +316 -0
- package/lib/interface/peopleTrackInterface.type.d.ts +17 -0
- package/lib/main/ability/const.d.ts +5 -0
- package/lib/main/ability/index.d.ts +37 -0
- package/lib/main/{iauth.d.ts → auth/index.d.ts} +34 -26
- package/lib/main/client.d.ts +423 -608
- package/lib/main/clientBase.d.ts +38 -0
- package/lib/main/clientState.d.ts +56 -0
- package/lib/main/device/index.d.ts +272 -0
- package/lib/main/device/index.type.d.ts +204 -0
- package/lib/main/helper/index.d.ts +120 -0
- package/lib/main/layout/index.d.ts +74 -108
- package/lib/main/layout/index.type.d.ts +270 -0
- package/lib/main/layout/polling.d.ts +17 -13
- package/lib/main/layout/state.d.ts +163 -0
- package/lib/main/layout/template.d.ts +3 -3
- package/lib/main/media/index.d.ts +177 -0
- package/lib/main/media/index.type.d.ts +9 -0
- package/lib/main/meeting/control.d.ts +107 -0
- package/lib/main/meeting/control.type.d.ts +24 -0
- package/lib/main/{meeting.d.ts → meeting/index.d.ts} +53 -28
- package/lib/main/meeting/verify.d.ts +69 -0
- package/lib/main/peer.d.ts +67 -19
- package/lib/main/plugin/index.d.ts +28 -0
- package/lib/{tools/quality.d.ts → main/quality/index.d.ts} +2 -2
- package/lib/{tools → main/quality}/quality.worker.d.ts +1 -1
- package/lib/main/{qualityManager.d.ts → quality/report.d.ts} +11 -5
- package/lib/main/render/index.d.ts +116 -0
- package/lib/main/render/index.type.d.ts +24 -0
- package/lib/main/render/videoManager.d.ts +190 -0
- package/lib/main/render/videoManager.type.d.ts +66 -0
- package/lib/main/roster/index.d.ts +39 -0
- package/lib/main/server/index.d.ts +79 -0
- package/lib/main/server/index.type.d.ts +21 -0
- package/lib/main/signal/index.d.ts +15 -0
- package/lib/main/socket/index.d.ts +95 -0
- package/lib/main/stream/index.d.ts +182 -0
- package/lib/main/track/baseTrack.d.ts +178 -0
- package/lib/main/track/contentTrack.d.ts +161 -0
- package/lib/main/track/customContentTrack.d.ts +18 -0
- package/lib/main/track/customVideoAudioTrack.d.ts +18 -0
- package/lib/main/track/helper.d.ts +53 -0
- package/lib/main/track/videoAudioCapture.d.ts +90 -0
- package/lib/main/track/videoAudioTrack.d.ts +243 -0
- package/lib/main/vom/index.d.ts +44 -0
- package/lib/main/vom/index.type.d.ts +1 -0
- package/lib/tools/analyser.d.ts +53 -0
- package/lib/tools/analyserManager.d.ts +55 -0
- package/lib/tools/dbManager.d.ts +12 -1
- package/lib/tools/{browser.d.ts → detectBrowser/index.d.ts} +53 -5
- package/lib/tools/detectStream/index.d.ts +84 -0
- package/lib/tools/detectStream/index.type.d.ts +56 -0
- package/lib/tools/detectTool/index.d.ts +191 -0
- package/lib/tools/detectTool/index.type.d.ts +62 -0
- package/lib/tools/emitter.d.ts +27 -6
- package/lib/tools/enum.d.ts +1 -1
- package/lib/tools/httpClient.d.ts +23 -6
- package/lib/tools/i18n.d.ts +1 -1
- package/lib/tools/index.d.ts +5 -5
- package/lib/tools/{logger.d.ts → log/logger.d.ts} +56 -26
- package/lib/tools/{logger.worker.d.ts → log/logger.worker.d.ts} +1 -1
- package/lib/tools/log/loggerManager.d.ts +69 -0
- package/lib/tools/pressure/index.d.ts +33 -0
- package/lib/tools/pressure/index.type.d.ts +22 -0
- package/lib/tools/promiseQueue.d.ts +51 -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 +109 -32
- package/lib/tools/template/index.d.ts +3 -3
- package/lib/tools/template/mobile.d.ts +1 -1
- package/lib/tools/template/polling.d.ts +1 -1
- package/lib/tools/utils.d.ts +22 -19
- package/lib/tools/verify.d.ts +7 -0
- package/lib/type/ability.d.ts +25 -0
- package/lib/type/analyser.d.ts +43 -0
- package/lib/type/{iauth.d.ts → auth.d.ts} +19 -26
- package/lib/type/base.d.ts +32 -32
- package/lib/type/capture.d.ts +9 -0
- package/lib/type/client.d.ts +198 -328
- package/lib/type/index.d.ts +23 -2
- package/lib/type/layout.d.ts +22 -47
- package/lib/type/logger.d.ts +37 -12
- package/lib/type/meeting.d.ts +282 -19
- package/lib/type/peer.d.ts +24 -1
- package/lib/type/polling.d.ts +1 -49
- package/lib/type/quality.d.ts +12 -2
- package/lib/type/socket.d.ts +42 -0
- package/lib/type/stream.d.ts +59 -33
- package/lib/type/track.d.ts +131 -0
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +30 -45
- package/lib/enum/contraints.d.ts +0 -50
- package/lib/main/deviceManager.d.ts +0 -185
- package/lib/main/helper.d.ts +0 -79
- package/lib/main/stream.d.ts +0 -396
- package/lib/main/videoManager.d.ts +0 -57
- package/lib/tools/audioLevel.d.ts +0 -23
- package/lib/tools/detect.d.ts +0 -43
- package/lib/type/device.d.ts +0 -83
package/README.MD
CHANGED
|
@@ -2,37 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
## 介绍
|
|
4
4
|
|
|
5
|
-
XY RTC Web SDK 是小鱼易连音视频通讯解决方案的Web端SDK,它是通过 HTML 网页加载的 JavaScript 库,采用 WebRTC 技术,开发者可以使用 XY RTC Web SDK 提供的 API 建立连接,控制实时多人音视频通话。
|
|
5
|
+
XY RTC Web SDK 是小鱼易连音视频通讯解决方案的 Web 端 SDK,它是通过 HTML 网页加载的 JavaScript 库,采用 WebRTC 技术,开发者可以使用 XY RTC Web SDK 提供的 API 建立连接,控制实时多人音视频通话。
|
|
6
6
|
|
|
7
|
-
目前 XY RTC Web SDK 主要支持 Chrome v72+ 和 Edge v80+ 浏览器。
|
|
8
7
|
## 安装
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
10
|
# 通过 Yarn 安装
|
|
11
|
-
$ yarn add @xylink/xy-rtc-sdk
|
|
11
|
+
$ yarn add @xylink/xy-rtc-sdk -S
|
|
12
12
|
|
|
13
13
|
# 通过 Npm 安装
|
|
14
|
-
$ npm install @xylink/xy-rtc-sdk
|
|
14
|
+
$ npm install @xylink/xy-rtc-sdk -S
|
|
15
15
|
```
|
|
16
|
+
|
|
16
17
|
## 示例
|
|
17
18
|
|
|
18
19
|
> **注意**:请务必使用 HTTPS 协议或者 localhost 开发、测试,否则无法正常使用 XY RTC SDK 进行加入会议操作;
|
|
19
20
|
|
|
21
|
+
```js
|
|
22
|
+
import XYRTC from '@xylink/xy-rtc-sdk';
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
// 创建Client和Stream模块
|
|
25
|
+
const { client, stream } = XYRTC.createClient({});
|
|
26
|
+
|
|
27
|
+
// 监听事件
|
|
28
|
+
client.on('call-status', () => {});
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
// 登录
|
|
31
|
+
const result = client.loginExternalAccount({});
|
|
32
|
+
|
|
33
|
+
// 呼叫会议
|
|
34
|
+
client.makeCall({ confNumber: '', displayName: '' });
|
|
35
|
+
|
|
36
|
+
// 创建Video和Audio流
|
|
37
|
+
const videoAudioTrack = await stream.createVideoAudioTrack({});
|
|
38
|
+
|
|
39
|
+
// 推送流
|
|
40
|
+
client.publish(videoAudioTrack);
|
|
25
41
|
```
|
|
26
42
|
|
|
43
|
+
详细集成流程参考[详细 API 文档](https://openapi.xylink.com/common/meeting/api/description?platform=web)完成音视频通话。
|
|
27
44
|
|
|
28
|
-
具体可参考[详细API文档](https://openapi.xylink.com/common/meeting/api/description?platform=web)完成音视频通话。
|
|
29
45
|
## 开源示例项目
|
|
30
|
-
|
|
46
|
+
|
|
47
|
+
我们在 GitHub 上提供了开源的示例项目供你参考:
|
|
31
48
|
|
|
32
49
|
- Vue 版本:https://github.com/xylink-com/xylink-rtc-vue-demo
|
|
33
50
|
- React 版本:https://github.com/xylink-com/xylink-rtc-demo
|
|
34
51
|
|
|
52
|
+
如果你是第一次集成 XY RTC SDK 产品,你可以使用我们基于 SDK 实现的产品进行体验:[小鱼 Web 会议](https://cdn.xylink.com/webrtc/web/index.html#/)。 我们会将 SDK 的最新功能在小鱼 Web 会议上进行集成展示出来,方便作为一种参考方式。
|
|
35
53
|
|
|
36
|
-
如果你是第一次集成 XY RTC SDK 产品,你可以使用我们基于 SDK 实现的产品进行体验:[小鱼 Web 会议](https://cdn.xylink.com/webrtc/web/index.html#/)。 我们会将 SDK 的最新功能在小鱼 Web 会议上进行集成展示出来,方便作为你的一种参考方式。
|
|
37
54
|
## 版本更新内容
|
|
38
|
-
|
|
55
|
+
|
|
56
|
+
具体可查看[发版说明文档](https://openapi.xylink.com/common/meeting/doc/version?platform=web)。
|
package/lib/action/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ILoginExtAccount, ISdkUserInfo, IMeetingInfo, IToken,
|
|
2
|
-
import Logger from '../tools/logger';
|
|
1
|
+
import { ILoginExtAccount, ISdkUserInfo, IMeetingInfo, IToken, IMeetingInviteParams, IMediaConfigParam, LoginType, LoginParams, SignInTextParams, FocusViewAction, IStateParams, ILoginWidthAuthCode, AutoMute } from '../type/index';
|
|
2
|
+
import Logger from '../tools/log/logger';
|
|
3
3
|
export interface ICommonParams {
|
|
4
4
|
securityKey: string;
|
|
5
5
|
callUri?: string;
|
|
@@ -16,6 +16,7 @@ declare class Action {
|
|
|
16
16
|
private httpDefaultBaseUrl;
|
|
17
17
|
private logHttpDefaultBaseUrl;
|
|
18
18
|
constructor(logger?: Logger);
|
|
19
|
+
getTokenInfo(): IToken;
|
|
19
20
|
/**
|
|
20
21
|
* 设置服务器地址
|
|
21
22
|
*
|
|
@@ -27,20 +28,36 @@ declare class Action {
|
|
|
27
28
|
baseUrl?: string;
|
|
28
29
|
logUrl?: string;
|
|
29
30
|
}): void;
|
|
31
|
+
/**
|
|
32
|
+
* 设置API网关校验信息
|
|
33
|
+
*
|
|
34
|
+
* @param { object } options - API网关校验信息
|
|
35
|
+
* @property { string } options.clientId - 网关校验
|
|
36
|
+
* @property { string } options.clientSecret - 网关密钥
|
|
37
|
+
*/
|
|
30
38
|
setClientInfo({ clientId, clientSecret }: {
|
|
31
39
|
clientId: string;
|
|
32
40
|
clientSecret: string;
|
|
33
41
|
}): void;
|
|
42
|
+
/**
|
|
43
|
+
* 设置会议相关会议,用于后续请求
|
|
44
|
+
*
|
|
45
|
+
* @param { IMeetingInfo } info - 会议相关信息
|
|
46
|
+
*/
|
|
34
47
|
setMeetingInfo(info: IMeetingInfo): void;
|
|
48
|
+
/**
|
|
49
|
+
* 设置token相关信息
|
|
50
|
+
*
|
|
51
|
+
* @param { IToken | null } tokenInfo - token信息
|
|
52
|
+
*/
|
|
35
53
|
setTokenInfo(tokenInfo: IToken | null): void;
|
|
36
|
-
getTokenInfo(): IToken;
|
|
37
54
|
/**
|
|
38
55
|
* 日志上传
|
|
39
56
|
*
|
|
40
57
|
* @param data
|
|
41
58
|
* @returns
|
|
42
59
|
*/
|
|
43
|
-
|
|
60
|
+
uploadLog(data: any): Promise<any>;
|
|
44
61
|
/**
|
|
45
62
|
* 不加密登录
|
|
46
63
|
*
|
|
@@ -62,28 +79,29 @@ declare class Action {
|
|
|
62
79
|
/**
|
|
63
80
|
* 根据Token获取用户信息
|
|
64
81
|
*
|
|
65
|
-
* @param { string } token
|
|
66
|
-
* @returns
|
|
82
|
+
* @param { string } token - token信息
|
|
83
|
+
* @returns { Object } - 用户信息
|
|
67
84
|
*/
|
|
68
85
|
getUserInfo(token: string): Promise<any>;
|
|
69
86
|
/**
|
|
70
87
|
* 获取云会议室信息
|
|
71
88
|
*
|
|
89
|
+
* 3.10_20240214 根据能力集更换成新的接口, 原接口:/api/rest/uss/v4/callUrlInfoV2,
|
|
90
|
+
*
|
|
72
91
|
* @param { Object } params
|
|
73
92
|
* @param { string } number 会议号
|
|
74
|
-
* @param { string } deviceType 设备类型
|
|
75
93
|
* @param { string } country 国际化
|
|
76
|
-
*
|
|
77
94
|
* @returns
|
|
78
95
|
*/
|
|
79
96
|
getCallUri(params: {
|
|
80
97
|
number: string;
|
|
81
|
-
|
|
82
|
-
country: string;
|
|
98
|
+
country?: string;
|
|
83
99
|
}): Promise<any>;
|
|
84
100
|
/**
|
|
85
101
|
* 校验会议室密码
|
|
86
102
|
*
|
|
103
|
+
* 3.10_20240214 更换成新的接口, 原接口:/api/rest/uss/v4/en/cloudmeeting/validation
|
|
104
|
+
*
|
|
87
105
|
* @param { string } confNumber 会议号
|
|
88
106
|
* @param { string } password 密码
|
|
89
107
|
* @returns
|
|
@@ -128,7 +146,9 @@ declare class Action {
|
|
|
128
146
|
* @param { IGetConferenceParams } params
|
|
129
147
|
* @returns
|
|
130
148
|
*/
|
|
131
|
-
getConference(userProfileId: number, securityKey: string, params:
|
|
149
|
+
getConference(userProfileId: number, securityKey: string, params: {
|
|
150
|
+
autoMute: AutoMute;
|
|
151
|
+
}): Promise<any>;
|
|
132
152
|
/**
|
|
133
153
|
* 功能操作上报记录
|
|
134
154
|
*
|
|
@@ -152,13 +172,15 @@ declare class Action {
|
|
|
152
172
|
* @param { number } userId 用户ID
|
|
153
173
|
* @param { string } server 服务端地址
|
|
154
174
|
* @param { string } enterpriseId 企业ID
|
|
155
|
-
* @param { boolean }
|
|
175
|
+
* @param { boolean } sign 是否签名
|
|
156
176
|
* @returns
|
|
157
177
|
*/
|
|
158
|
-
getAllocation(userId: number, server: string, enterpriseId: string,
|
|
178
|
+
getAllocation(userId: number, server: string, enterpriseId: string, sign?: boolean): Promise<any>;
|
|
159
179
|
/**
|
|
160
180
|
* 获取会议室水印
|
|
161
181
|
*
|
|
182
|
+
* 3.10_20240214 根据能力集更换成新的接口, 原接口:/api/rest/v1/meetingroom/conferenceNumber/watermarkContent/{conferenceNumber}
|
|
183
|
+
*
|
|
162
184
|
* @param { string } conferenceNumber 会议号
|
|
163
185
|
* @returns
|
|
164
186
|
*/
|
|
@@ -173,12 +195,7 @@ declare class Action {
|
|
|
173
195
|
* @param { string } params.httpServer 服务器地址
|
|
174
196
|
* @returns
|
|
175
197
|
*/
|
|
176
|
-
getEnterpriseId(
|
|
177
|
-
extId: string;
|
|
178
|
-
clientId: string;
|
|
179
|
-
clientSecret: string;
|
|
180
|
-
httpServer?: string;
|
|
181
|
-
}): Promise<any>;
|
|
198
|
+
getEnterpriseId(extId: string): Promise<any>;
|
|
182
199
|
/**
|
|
183
200
|
* WebRTC 内外网探测
|
|
184
201
|
*
|
|
@@ -189,12 +206,7 @@ declare class Action {
|
|
|
189
206
|
* @param { string } params.httpServer 服务器地址
|
|
190
207
|
* @returns
|
|
191
208
|
*/
|
|
192
|
-
locator(
|
|
193
|
-
extId: string;
|
|
194
|
-
clientId: string;
|
|
195
|
-
clientSecret: string;
|
|
196
|
-
httpServer?: string;
|
|
197
|
-
}): Promise<any>;
|
|
209
|
+
locator(enterpriseId: string): Promise<any>;
|
|
198
210
|
/**
|
|
199
211
|
* 监会操作
|
|
200
212
|
*
|
|
@@ -242,7 +254,7 @@ declare class Action {
|
|
|
242
254
|
*/
|
|
243
255
|
getEnterpriseMediaConfig(userId: number, config: IMediaConfigParam[]): Promise<any>;
|
|
244
256
|
/**
|
|
245
|
-
* 获取企业相关配置(buffet),
|
|
257
|
+
* 获取企业相关配置(buffet), 包含头像配置、禁用语音转写英文翻译
|
|
246
258
|
*
|
|
247
259
|
* 内部企业ID的话,uaa-api会在转发请求时,放在请求头带给后端服务。
|
|
248
260
|
* 服务端需要兼容下取参数的位置,如果他们之前的位置取不到内部企业ID,就从header头上的特定字段去取。
|
|
@@ -257,18 +269,21 @@ declare class Action {
|
|
|
257
269
|
* @param { string } refresh_token 待刷新的token
|
|
258
270
|
* @returns
|
|
259
271
|
*/
|
|
260
|
-
refreshToken(refresh_token
|
|
272
|
+
refreshToken(refresh_token?: string): Promise<any>;
|
|
261
273
|
/**
|
|
262
274
|
* 获取会议邀请链接信息
|
|
263
275
|
*
|
|
264
|
-
*
|
|
276
|
+
* 3.10_20240214 更换接口, 原接口:/page/client/shareConference/infomation
|
|
265
277
|
*
|
|
278
|
+
* @param { IMeetingInviteParams } params 邀请链接请求参数
|
|
266
279
|
* @returns
|
|
267
280
|
*/
|
|
268
281
|
getMeetingInviteInfo(params: IMeetingInviteParams): Promise<any>;
|
|
269
282
|
/**
|
|
270
283
|
* 获取个人云会议室信息,包含入会密码和个人云会议室号
|
|
271
284
|
*
|
|
285
|
+
* 3.10_20240214 更换接口, 原接口:/api/rest/v3/en/user/${userId}/cloudMeetingRooms
|
|
286
|
+
*
|
|
272
287
|
* @param { number } userId 用户ID
|
|
273
288
|
* @returns
|
|
274
289
|
*/
|
|
@@ -276,6 +291,8 @@ declare class Action {
|
|
|
276
291
|
/**
|
|
277
292
|
* 获取参会者头像
|
|
278
293
|
*
|
|
294
|
+
* 3.10_20240214 更换接口, 原接口:/api/rest/v4/en/incomingcallUrlInfo
|
|
295
|
+
*
|
|
279
296
|
* @param { string } callUrl 待获取头像的参会者callUri
|
|
280
297
|
* @returns
|
|
281
298
|
*/
|
|
@@ -290,14 +307,42 @@ declare class Action {
|
|
|
290
307
|
* @returns
|
|
291
308
|
*/
|
|
292
309
|
sendVideoControlResult(type: 'muteVideo' | 'unMuteVideo', value: string): Promise<any>;
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
310
|
+
/**
|
|
311
|
+
* 签到
|
|
312
|
+
*
|
|
313
|
+
* @param { Object } params - 参数
|
|
314
|
+
* @param { string } params.deviceId - 用户ID
|
|
315
|
+
* @param { string } params.questionnaireId - 签到ID
|
|
316
|
+
* @returns
|
|
317
|
+
*/
|
|
318
|
+
signIn({ deviceId, questionnaireId }: {
|
|
319
|
+
deviceId: string;
|
|
320
|
+
questionnaireId: string;
|
|
300
321
|
}): Promise<any>;
|
|
322
|
+
/**
|
|
323
|
+
* 校验会控主持密码
|
|
324
|
+
*
|
|
325
|
+
* @param { string } pwd - 参数
|
|
326
|
+
* @returns
|
|
327
|
+
*/
|
|
328
|
+
verifyControlPassword(pwd: string): Promise<any>;
|
|
329
|
+
/**
|
|
330
|
+
* 终端获取签到答题等文案
|
|
331
|
+
*
|
|
332
|
+
* @param { Object } params - 参数
|
|
333
|
+
* @param { EVENT_TYPE } type - 业务状态
|
|
334
|
+
* @param { number } businessType - 业务类型
|
|
335
|
+
* @param { string } environment - 语言,中文:zh-cn 、英文:en、台湾:zh-tw、香港:zh-hk
|
|
336
|
+
* @returns
|
|
337
|
+
*/
|
|
338
|
+
getSignInText({ type, environment, businessType }: SignInTextParams): Promise<any>;
|
|
339
|
+
/**
|
|
340
|
+
* 授权码登录(建行)
|
|
341
|
+
*
|
|
342
|
+
* @param { ILoginWidthAuthCode } params 参数
|
|
343
|
+
* @returns
|
|
344
|
+
*/
|
|
345
|
+
loginWithAuthCode({ extId, extUserId, displayName, oauthCode, isTempUser, channelId }: ILoginWidthAuthCode): Promise<any>;
|
|
301
346
|
/**
|
|
302
347
|
* 三方用户统一认证登录
|
|
303
348
|
*
|
|
@@ -321,10 +366,19 @@ declare class Action {
|
|
|
321
366
|
* @returns
|
|
322
367
|
*/
|
|
323
368
|
rename(newName: string): Promise<any>;
|
|
369
|
+
/**
|
|
370
|
+
* 获取能力集
|
|
371
|
+
*
|
|
372
|
+
* @param { number[] } localAbilities - 终端能力集
|
|
373
|
+
* @returns { number[] } abilityList - 服务端能力集
|
|
374
|
+
*/
|
|
375
|
+
getAbility(localAbilities?: number[]): Promise<any>;
|
|
376
|
+
endAllMeeting(): Promise<any>;
|
|
324
377
|
/**
|
|
325
378
|
* 设置默认参数,如securityKey
|
|
326
379
|
*
|
|
327
|
-
* @param {
|
|
380
|
+
* @param { number[] } localAbilities - 终端能力集
|
|
381
|
+
* @returns { number[] } abilityList - 服务端能力集
|
|
328
382
|
*/
|
|
329
383
|
setCommonParams(data: Record<string, any>): void;
|
|
330
384
|
/**
|
|
@@ -341,5 +395,17 @@ declare class Action {
|
|
|
341
395
|
* @returns
|
|
342
396
|
*/
|
|
343
397
|
private customLogin;
|
|
398
|
+
/**
|
|
399
|
+
* 加密密码
|
|
400
|
+
*/
|
|
401
|
+
private encryptPassword;
|
|
402
|
+
/**
|
|
403
|
+
* 获取加密密码, 如何base64后不是128的倍数
|
|
404
|
+
*
|
|
405
|
+
* @param { string } pubKey - 秘钥
|
|
406
|
+
* @param { string } password - 待加密的密码
|
|
407
|
+
* @param { string } isSha512 - 是否经过sha512处理
|
|
408
|
+
*/
|
|
409
|
+
private getEncryptPwd;
|
|
344
410
|
}
|
|
345
411
|
export default Action;
|
package/lib/enum/client.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* XYLink 入口配置
|
|
3
3
|
*
|
|
4
4
|
* Created at : 2023-04-26 15:28:46
|
|
5
|
-
* Last modified :
|
|
5
|
+
* Last modified : 2024-04-23 19:16:27
|
|
6
6
|
*/
|
|
7
|
-
import { IClientConfig } from '../type';
|
|
7
|
+
import { IClientConfig } from '../type/index';
|
|
8
8
|
export declare const DEFAULT_LOG_STYLE = "color: #3876ff;";
|
|
9
9
|
export declare const DEFAULT_LINE = "*********************************************************";
|
|
10
10
|
/**
|
|
@@ -13,3 +13,9 @@ export declare const DEFAULT_LINE = "*******************************************
|
|
|
13
13
|
export declare const DEFAULT_CLIENT_CONFIG: IClientConfig;
|
|
14
14
|
export declare const XYLink_LOG: string;
|
|
15
15
|
export declare const XYLINK_LOG_AGENT: string;
|
|
16
|
+
export declare const XY_DEFAULT_LOGGER_CONFIG: {
|
|
17
|
+
dbName: string;
|
|
18
|
+
tableName: string;
|
|
19
|
+
dbVersion: number;
|
|
20
|
+
tableCount: number;
|
|
21
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebRTC SDK视频流采集约束配置
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2023-10-11 11:19:12
|
|
5
|
+
* Last modified : 2024-05-14 11:14:07
|
|
6
|
+
*/
|
|
7
|
+
import { XYContentConfig, XYPeopleConfig, StreamResolution, ConstraintMode, StreamFrameRate } from '../type/index';
|
|
8
|
+
/**
|
|
9
|
+
* people基础约束配置
|
|
10
|
+
*/
|
|
11
|
+
export declare const BASE_PEOPLE_CONSTRAINTS: XYPeopleConfig;
|
|
12
|
+
/**
|
|
13
|
+
* content采集基础约束配置
|
|
14
|
+
*/
|
|
15
|
+
export declare const BASE_CONTENT_CONSTRAINTS: XYContentConfig;
|
|
16
|
+
/**
|
|
17
|
+
* people采集音频基础约束配置
|
|
18
|
+
*/
|
|
19
|
+
export declare const BASE_PEOPLE_AUDIO_CONSTRAINTS: {
|
|
20
|
+
channelCount: number;
|
|
21
|
+
autoGainControl: boolean;
|
|
22
|
+
noiseSuppression: boolean;
|
|
23
|
+
echoCancellation: boolean;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* content 720P 1080P 采集配置信息
|
|
27
|
+
*
|
|
28
|
+
* COMMON: 普通模式
|
|
29
|
+
* ADVANCED: 高级模式, 帧率、宽、高 可进行最大、最小、期望设置
|
|
30
|
+
*
|
|
31
|
+
* @param { StreamResolution } resolution - 分辨率
|
|
32
|
+
* @param { StreamFrameRate } frameRate - 帧率
|
|
33
|
+
* @param { ConstraintMode } constraintMode - 模式
|
|
34
|
+
*/
|
|
35
|
+
export declare const GET_CONTENT_CONSTRAINTS: (resolution: StreamResolution, frameRate: StreamFrameRate, constraintMode: ConstraintMode) => any;
|
|
36
|
+
/**
|
|
37
|
+
* people 180P 360P 720P 采集配置信息
|
|
38
|
+
*
|
|
39
|
+
* common: 普通模式
|
|
40
|
+
* advanced: 高级模式, 帧率、宽、高 可进行最大、最小、期望设置
|
|
41
|
+
* 特殊说明:180P采集默认配置15帧率,无法增加,其他支持基于Config配置形式采集
|
|
42
|
+
*/
|
|
43
|
+
export declare const GET_PEOPLE_CONSTRAINTS: (resolution: StreamResolution, frameRate: StreamFrameRate, constraintMode: ConstraintMode) => any;
|
|
44
|
+
/**
|
|
45
|
+
* 分辨率枚举,将分辨率转换为0-6的索引值
|
|
46
|
+
*/
|
|
47
|
+
export declare const RESOLUTION_MAP: Record<string, number>;
|
|
48
|
+
/**
|
|
49
|
+
* 枚举分辨率对应的最小带宽值
|
|
50
|
+
*/
|
|
51
|
+
export declare const MIN_BANDWIDTH_MAP: Record<string, number>;
|
package/lib/enum/device.d.ts
CHANGED
|
@@ -2,3 +2,31 @@ export declare const DEVICE_TYPE_MAP: {
|
|
|
2
2
|
[key: string]: string;
|
|
3
3
|
};
|
|
4
4
|
export declare const HARD_DEVICE_TYPE_LIST: string[];
|
|
5
|
+
/**
|
|
6
|
+
* 设备列表默认值
|
|
7
|
+
*/
|
|
8
|
+
export declare const DEFAULT_DEVICE_LIST: {
|
|
9
|
+
audioInputList: never[];
|
|
10
|
+
audioOutputList: never[];
|
|
11
|
+
videoInputList: never[];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* 设备ID默认值
|
|
15
|
+
*/
|
|
16
|
+
export declare const INIT_DEVICES_ID: {
|
|
17
|
+
audioInput: string;
|
|
18
|
+
audioOutput: string;
|
|
19
|
+
videoInput: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* 浏览器系统默认ID
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_BROWSER_DEVICE_ID = "default";
|
|
25
|
+
/**
|
|
26
|
+
* 系统默认BaseDevice
|
|
27
|
+
*/
|
|
28
|
+
export declare const BASE_DEVICE: {
|
|
29
|
+
deviceId: string;
|
|
30
|
+
label: string;
|
|
31
|
+
groupId: string;
|
|
32
|
+
};
|
package/lib/enum/errorCode.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* WebRTC SDK 统一错误码集合
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2023-10-11 11:18:07
|
|
5
|
+
* Last modified : 2024-05-31 14:05:56
|
|
6
|
+
*/
|
|
7
|
+
import { TLocale } from '../type/index';
|
|
2
8
|
export declare const SERVER_ERROR_CODE_MAP: {
|
|
3
|
-
[key: number]: string;
|
|
9
|
+
[key: number | string]: string;
|
|
4
10
|
};
|
|
5
11
|
export declare const UPDATE_NAME_ERROR_CODE: {
|
|
6
12
|
[key: number]: string;
|
package/lib/enum/i18n.d.ts
CHANGED
package/lib/enum/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
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, LayoutConfig } from '../type';
|
|
7
|
+
import { IDefault, IOPERATE_MAP, IRoster, IFeatureConfig, StreamStatus, StreamType, ILoggerConfig, FacingMode, StreamResolution, TemplateMode, ContentTemplateMode, LayoutConfig, IMediaConfig, IMackCall, ContentTrackConfig, PeopleTrackConfig, SwitchDeviceConfig, DEVICE_KIND } from '../type/index';
|
|
8
|
+
export * from './constraints';
|
|
9
|
+
export * from './analyser';
|
|
8
10
|
export declare const LOG_CACHE_COUNT = 10;
|
|
9
11
|
export declare const DB_TABLE_COUNT = 10;
|
|
10
12
|
export declare const DETECT_LOCATOR_SERVER_NAME = "WebrtcSigGW";
|
|
@@ -160,6 +162,14 @@ export declare const DEF_DB_VERSION = 1;
|
|
|
160
162
|
* 默认数据表的起始索引序列
|
|
161
163
|
*/
|
|
162
164
|
export declare const DEF_TABLE_INDEX = 1;
|
|
165
|
+
/**
|
|
166
|
+
* 需要过滤的最小声量数据
|
|
167
|
+
*/
|
|
168
|
+
export declare const MIN_AUDIO_LEVEL = 9;
|
|
169
|
+
/**
|
|
170
|
+
* 声量设备缓存时间
|
|
171
|
+
*/
|
|
172
|
+
export declare const SPEAKER_KEEP_INTERVAL = 3000;
|
|
163
173
|
/**
|
|
164
174
|
* 默认数据库配置
|
|
165
175
|
*/
|
|
@@ -171,9 +181,10 @@ export declare const FACING_MODE_LIST: readonly [FacingMode.FRONT, FacingMode.BA
|
|
|
171
181
|
/**
|
|
172
182
|
* 企业配置信息
|
|
173
183
|
*
|
|
174
|
-
* @property downLinkCeilingRate 下行带宽配置
|
|
175
|
-
* @property upLinkCeilingRate 上行带宽配置(暂不支持)
|
|
176
|
-
* @property pvrxResolution
|
|
184
|
+
* @property downLinkCeilingRate - 下行带宽配置
|
|
185
|
+
* @property upLinkCeilingRate - 上行带宽配置(暂不支持)
|
|
186
|
+
* @property pvrxResolution - 下行最大分辨率配置
|
|
187
|
+
* @property pvtxResolution - 上行最大分辨率配置
|
|
177
188
|
*/
|
|
178
189
|
export declare const ENTERPRISE_CONFIG: {
|
|
179
190
|
downLinkCeilingRate: {
|
|
@@ -188,6 +199,10 @@ export declare const ENTERPRISE_CONFIG: {
|
|
|
188
199
|
clientConfigName: string;
|
|
189
200
|
configName: string;
|
|
190
201
|
};
|
|
202
|
+
pvtxResolution: {
|
|
203
|
+
clientConfigName: string;
|
|
204
|
+
configName: string;
|
|
205
|
+
};
|
|
191
206
|
};
|
|
192
207
|
/**
|
|
193
208
|
* 枚举会控平台
|
|
@@ -207,4 +222,72 @@ export declare const DEFAULT_LAYOUT_CONFIG: LayoutConfig;
|
|
|
207
222
|
* Web支持的轮询画面
|
|
208
223
|
*/
|
|
209
224
|
export declare const MULTI_IMAGE: string[];
|
|
210
|
-
|
|
225
|
+
/**
|
|
226
|
+
* 高分辨率配置
|
|
227
|
+
*/
|
|
228
|
+
export declare const HIGH_RESOLUTION = StreamResolution.RS1080;
|
|
229
|
+
/**
|
|
230
|
+
* 低分辨率配置
|
|
231
|
+
*/
|
|
232
|
+
export declare const LM_CONFIG: {
|
|
233
|
+
peopleRecResolution: StreamResolution;
|
|
234
|
+
peopleSendResolution: StreamResolution;
|
|
235
|
+
contentRecResolution: StreamResolution;
|
|
236
|
+
contentSendResolution: StreamResolution;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* 流畅模式下视频发送和接收配置
|
|
240
|
+
*
|
|
241
|
+
* 理论上,如果需要配置带宽配置,不应该启用配置流畅模式
|
|
242
|
+
*
|
|
243
|
+
* 注意:可能出现NConsole配置的比流畅模式还低的情况,这种情况可以暂时忽略,不做考虑
|
|
244
|
+
* people默认发送和接收360P画面
|
|
245
|
+
* content模式发送和接收720P画面
|
|
246
|
+
* 后期如果觉得不太合适,可以随时调整此配置
|
|
247
|
+
*/
|
|
248
|
+
export declare const SM_CONFIG: {
|
|
249
|
+
peopleRecResolution: StreamResolution;
|
|
250
|
+
peopleSendResolution: StreamResolution;
|
|
251
|
+
contentRecResolution: StreamResolution;
|
|
252
|
+
contentSendResolution: StreamResolution;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* 默认SDK视频发送和接收配置
|
|
256
|
+
*/
|
|
257
|
+
export declare const NM_CONFIG: {
|
|
258
|
+
peopleRecResolution: StreamResolution;
|
|
259
|
+
peopleSendResolution: StreamResolution;
|
|
260
|
+
contentRecResolution: StreamResolution;
|
|
261
|
+
contentSendResolution: StreamResolution;
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* 默认媒体配置表
|
|
265
|
+
*/
|
|
266
|
+
export declare const DEFAULT_MEDIA_CONFIG: IMediaConfig;
|
|
267
|
+
/**
|
|
268
|
+
* 默认MakeCall参数
|
|
269
|
+
*/
|
|
270
|
+
export declare const DEFAULT_MAKE_CALL_PARAMS: IMackCall;
|
|
271
|
+
/**
|
|
272
|
+
* 默认People Track配置
|
|
273
|
+
*/
|
|
274
|
+
export declare const DEFAULT_INIT_TRACK_CONFIG: PeopleTrackConfig;
|
|
275
|
+
/**
|
|
276
|
+
* 默认Content Track配置
|
|
277
|
+
*/
|
|
278
|
+
export declare const DEFAULT_CONTENT_TRACK_CONFIG: ContentTrackConfig;
|
|
279
|
+
/**
|
|
280
|
+
* 默认约束配置
|
|
281
|
+
*/
|
|
282
|
+
export declare const BASE_SUPPORTS_CONSTRAINTS: any;
|
|
283
|
+
/**
|
|
284
|
+
* 切换设备,默认设备配置
|
|
285
|
+
*/
|
|
286
|
+
export declare const DEFAULT_DEVICE_CONFIG: SwitchDeviceConfig;
|
|
287
|
+
/**
|
|
288
|
+
* 设备Kind转为中文描述
|
|
289
|
+
*/
|
|
290
|
+
export declare const DEFAULT_KIND_MAP: {
|
|
291
|
+
[key in DEVICE_KIND]: string;
|
|
292
|
+
};
|
|
293
|
+
export declare const INIT_CONTENT_STREAMS: {};
|
package/lib/enum/polling.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* @summary short description for the file
|
|
5
|
-
* @author JingHui Luo <luojinghui424@gmail.com>
|
|
6
|
-
*
|
|
7
|
-
* Created at : 2024-02-28 18:30:52
|
|
8
|
-
* Last modified : 2024-04-16 11:40:05
|
|
9
|
-
*/
|
|
10
|
-
import { PollingLayout } from '../type/polling';
|
|
11
|
-
export declare const DEFAULT_POLLING_LAYOUT: PollingLayout;
|
|
1
|
+
import { ILayout } from '../type/index';
|
|
2
|
+
export declare const DEFAULT_POLLING_LAYOUT: ILayout;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XY WebRTC SDK Custom Message Lib
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2024-05-16 10:36:06
|
|
5
|
+
* Last modified : 2024-06-07 17:53:30
|
|
6
|
+
*/
|
|
7
|
+
import XYRTCClient from '../../main/client';
|
|
8
|
+
import { ICustomMessageConfig, XYBaseModule } from '../../type/index';
|
|
9
|
+
export declare class XYCustomMessage implements XYBaseModule {
|
|
10
|
+
private client;
|
|
11
|
+
private logger;
|
|
12
|
+
constructor(client: XYRTCClient);
|
|
13
|
+
destroy(): void;
|
|
14
|
+
/**
|
|
15
|
+
* 处理媒体转发的用户自定义消息
|
|
16
|
+
*
|
|
17
|
+
* @param { object } data - 媒体下发的用户自定义消息数据
|
|
18
|
+
*/
|
|
19
|
+
handleReceiveCustomMessage(data: any): void;
|
|
20
|
+
/**
|
|
21
|
+
* 发送自定义消息
|
|
22
|
+
*
|
|
23
|
+
* @param { object } config - 配置参数
|
|
24
|
+
* @param { number } config.toPid - 消息的接收方pid,0表示广播消息、非0表示单点消息;
|
|
25
|
+
* @param { string } config.data - 消息内容,JSON字符串;因业务数据可能会传输图片,需要对二进制数据进行base64编码,消息长度限制最大:1030KB
|
|
26
|
+
* @return { IReturnResult } - 返回结果
|
|
27
|
+
*/
|
|
28
|
+
sendCustomMessage(config: ICustomMessageConfig): import("../../type/index").IReturnResult;
|
|
29
|
+
}
|