@xylink/xy-rtc-sdk 4.0.7 → 4.0.8
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 +12 -2
- package/enum/constraints.d.ts +0 -16
- package/enum/index.d.ts +63 -3
- package/main/layout/index.d.ts +11 -3
- package/main/layout/polling.d.ts +68 -10
- package/main/layout/state.d.ts +46 -5
- package/main/meeting/index.d.ts +5 -0
- package/main/peer/index.d.ts +2 -1
- package/main/peer/index.type.d.ts +36 -0
- package/main/quality/index.d.ts +19 -0
- package/main/quality/index.type.d.ts +27 -0
- package/package.json +2 -3
- package/type/client.d.ts +19 -15
- package/type/polling.d.ts +46 -14
- package/type/quality.d.ts +2 -0
- package/type/stream.d.ts +1 -0
- package/xyrtc.js +17502 -17315
package/README.md
CHANGED
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
XYLink Web SDK 是小鱼易连音视频通讯解决方案的 Web 端 SDK,它是通过 HTML 网页加载的 JavaScript 库,采用 WebRTC 技术,开发者可以使用 XYLink Web SDK 提供的方法快速实现高质量、高品质、高性能的多人音视频通话服务。
|
|
6
6
|
|
|
7
|
+
## 在线体验
|
|
8
|
+
|
|
9
|
+
- [小鱼易连 Web 会议](https://meet.xylink.com)
|
|
10
|
+
|
|
11
|
+
## 开发文档
|
|
12
|
+
|
|
13
|
+
- [产品介绍](https://openapi.xylink.com/common/meeting/doc/description?platform=web)
|
|
14
|
+
- [视频通话](https://openapi.xylink.com/common/meeting/doc/video_call?platform=web)
|
|
15
|
+
- [API 参考](https://openapi.xylink.com/common/meeting/api/description?platform=web)
|
|
16
|
+
|
|
7
17
|
## 安装
|
|
8
18
|
|
|
9
19
|
```bash
|
|
@@ -27,7 +37,7 @@ XYClient.on('call-status', () => {});
|
|
|
27
37
|
// 其他事件...
|
|
28
38
|
|
|
29
39
|
// 登录
|
|
30
|
-
await XYClient.loginExternalAccount({});
|
|
40
|
+
await XYClient.loginExternalAccount({...});
|
|
31
41
|
|
|
32
42
|
// 呼叫会议
|
|
33
43
|
await XYClient.makeCall({ confNumber: '', displayName: '' });
|
|
@@ -41,7 +51,7 @@ await videoAudioTrack.capture();
|
|
|
41
51
|
XYClient.publish(videoAudioTrack);
|
|
42
52
|
```
|
|
43
53
|
|
|
44
|
-
详细集成流程参考[
|
|
54
|
+
详细集成流程参考[视频通话](https://openapi.xylink.com/common/meeting/doc/video_call?platform=web)文档;
|
|
45
55
|
|
|
46
56
|
## 开源示例项目
|
|
47
57
|
|
package/enum/constraints.d.ts
CHANGED
|
@@ -23,17 +23,7 @@ export declare const getElectronConstraints: (width: number, height: number, fra
|
|
|
23
23
|
chromeMediaSourceId: string;
|
|
24
24
|
};
|
|
25
25
|
optional: ({
|
|
26
|
-
echoCancellation: boolean;
|
|
27
|
-
noiseSuppression?: undefined;
|
|
28
|
-
autoGainControl?: undefined;
|
|
29
|
-
googAutoGainControl?: undefined;
|
|
30
|
-
googNoiseSuppression?: undefined;
|
|
31
|
-
googHighpassFilter?: undefined;
|
|
32
|
-
googTypingNoiseDetection?: undefined;
|
|
33
|
-
googAudioMirroring?: undefined;
|
|
34
|
-
} | {
|
|
35
26
|
noiseSuppression: boolean;
|
|
36
|
-
echoCancellation?: undefined;
|
|
37
27
|
autoGainControl?: undefined;
|
|
38
28
|
googAutoGainControl?: undefined;
|
|
39
29
|
googNoiseSuppression?: undefined;
|
|
@@ -42,7 +32,6 @@ export declare const getElectronConstraints: (width: number, height: number, fra
|
|
|
42
32
|
googAudioMirroring?: undefined;
|
|
43
33
|
} | {
|
|
44
34
|
autoGainControl: boolean;
|
|
45
|
-
echoCancellation?: undefined;
|
|
46
35
|
noiseSuppression?: undefined;
|
|
47
36
|
googAutoGainControl?: undefined;
|
|
48
37
|
googNoiseSuppression?: undefined;
|
|
@@ -51,7 +40,6 @@ export declare const getElectronConstraints: (width: number, height: number, fra
|
|
|
51
40
|
googAudioMirroring?: undefined;
|
|
52
41
|
} | {
|
|
53
42
|
googAutoGainControl: boolean;
|
|
54
|
-
echoCancellation?: undefined;
|
|
55
43
|
noiseSuppression?: undefined;
|
|
56
44
|
autoGainControl?: undefined;
|
|
57
45
|
googNoiseSuppression?: undefined;
|
|
@@ -60,7 +48,6 @@ export declare const getElectronConstraints: (width: number, height: number, fra
|
|
|
60
48
|
googAudioMirroring?: undefined;
|
|
61
49
|
} | {
|
|
62
50
|
googNoiseSuppression: boolean;
|
|
63
|
-
echoCancellation?: undefined;
|
|
64
51
|
noiseSuppression?: undefined;
|
|
65
52
|
autoGainControl?: undefined;
|
|
66
53
|
googAutoGainControl?: undefined;
|
|
@@ -69,7 +56,6 @@ export declare const getElectronConstraints: (width: number, height: number, fra
|
|
|
69
56
|
googAudioMirroring?: undefined;
|
|
70
57
|
} | {
|
|
71
58
|
googHighpassFilter: boolean;
|
|
72
|
-
echoCancellation?: undefined;
|
|
73
59
|
noiseSuppression?: undefined;
|
|
74
60
|
autoGainControl?: undefined;
|
|
75
61
|
googAutoGainControl?: undefined;
|
|
@@ -78,7 +64,6 @@ export declare const getElectronConstraints: (width: number, height: number, fra
|
|
|
78
64
|
googAudioMirroring?: undefined;
|
|
79
65
|
} | {
|
|
80
66
|
googTypingNoiseDetection: boolean;
|
|
81
|
-
echoCancellation?: undefined;
|
|
82
67
|
noiseSuppression?: undefined;
|
|
83
68
|
autoGainControl?: undefined;
|
|
84
69
|
googAutoGainControl?: undefined;
|
|
@@ -87,7 +72,6 @@ export declare const getElectronConstraints: (width: number, height: number, fra
|
|
|
87
72
|
googAudioMirroring?: undefined;
|
|
88
73
|
} | {
|
|
89
74
|
googAudioMirroring: boolean;
|
|
90
|
-
echoCancellation?: undefined;
|
|
91
75
|
noiseSuppression?: undefined;
|
|
92
76
|
autoGainControl?: undefined;
|
|
93
77
|
googAutoGainControl?: undefined;
|
package/enum/index.d.ts
CHANGED
|
@@ -1,19 +1,79 @@
|
|
|
1
|
-
import { IDefault, IOPERATE_MAP, IRoster, IFeatureConfig, StreamStatus, StreamType, ILoggerConfig, FacingMode, StreamResolution, TemplateMode, ContentTemplateMode, LayoutConfig, IMediaConfig, IMakeCall, ContentTrackConfig, PeopleTrackConfig, SwitchDeviceConfig, DEVICE_KIND } from '../type/index';
|
|
1
|
+
import { IDefault, IOPERATE_MAP, IRoster, IFeatureConfig, StreamStatus, StreamType, ILoggerConfig, FacingMode, StreamResolution, TemplateMode, ContentTemplateMode, LayoutConfig, IMediaConfig, IMakeCall, ContentTrackConfig, PeopleTrackConfig, SwitchDeviceConfig, DEVICE_KIND, CustomizedMode } from '../type/index';
|
|
2
2
|
export * from './constraints';
|
|
3
3
|
export * from './analyser';
|
|
4
|
+
/**
|
|
5
|
+
* 日志最大缓存条数
|
|
6
|
+
*/
|
|
4
7
|
export declare const LOG_CACHE_COUNT = 10;
|
|
8
|
+
/**
|
|
9
|
+
* 日志表的数量
|
|
10
|
+
*/
|
|
5
11
|
export declare const DB_TABLE_COUNT = 10;
|
|
12
|
+
/**
|
|
13
|
+
* 信令服务名称
|
|
14
|
+
*/
|
|
6
15
|
export declare const DETECT_LOCATOR_SERVER_NAME = "WebrtcSigGW";
|
|
16
|
+
/**
|
|
17
|
+
* 视频Codec协议
|
|
18
|
+
*/
|
|
7
19
|
export declare const MIME_TYPE = "video/H264";
|
|
20
|
+
/**
|
|
21
|
+
* 音频Codec协议
|
|
22
|
+
*/
|
|
8
23
|
export declare const MIME_AUDIO_TYPE = "audio/opus";
|
|
24
|
+
/**
|
|
25
|
+
* WebRTC 设备类型
|
|
26
|
+
*/
|
|
9
27
|
export declare const DEVICE_TYPE = 17;
|
|
28
|
+
/**
|
|
29
|
+
* 自定义roster中自己的pid数据
|
|
30
|
+
*/
|
|
10
31
|
export declare const SELF_MOCK_PID = 9999999999;
|
|
11
|
-
|
|
32
|
+
/**
|
|
33
|
+
* peer 9+2路画面通道数量(包含两路content画面)
|
|
34
|
+
*/
|
|
35
|
+
export declare const STREAM_11_CHANNEL_COUNT = 11;
|
|
36
|
+
/**
|
|
37
|
+
* peer 20+2路画面通道数量(包含两路content画面)
|
|
38
|
+
*/
|
|
39
|
+
export declare const STREAM_20_CHANNEL_COUNT = 22;
|
|
40
|
+
/**
|
|
41
|
+
* peer 屏幕外声音通道数量
|
|
42
|
+
*/
|
|
12
43
|
export declare const STREAM_OUTSIDE_CHANNEL_COUNT = 3;
|
|
44
|
+
/**
|
|
45
|
+
* 最多翻页Layout数量
|
|
46
|
+
*/
|
|
13
47
|
export declare const MAX_PARTICIPANT_COUNT = 112;
|
|
48
|
+
/**
|
|
49
|
+
* 用户自定义消息,最大Length长度
|
|
50
|
+
* 大小为1030kb,转化计算:1030 * 1000 / 0.75
|
|
51
|
+
* 大小为1.3MB,转化计算:1385 * 1000 / 0.75
|
|
52
|
+
* export const MAX_CUSTOM_MESSAGE_LEN = 1373333;
|
|
53
|
+
*/
|
|
14
54
|
export declare const MAX_CUSTOM_MESSAGE_LEN = 1846666;
|
|
55
|
+
/**
|
|
56
|
+
* 用户自定义消息,最大Length长度,10KB大小
|
|
57
|
+
*/
|
|
15
58
|
export declare const MAX_CUSTOM_MESSAGE_LOG_LEN = 13333;
|
|
59
|
+
/**
|
|
60
|
+
* 采集流错误码
|
|
61
|
+
*
|
|
62
|
+
* XYSDK:950401 摄像头或者麦克风设备缺失
|
|
63
|
+
* XYSDK:950402 摄像头或麦克风设备无法访问
|
|
64
|
+
* XYSDK:950403 约束设置无法被满足
|
|
65
|
+
* XYSDK:950404 麦克风或摄像头使用权限被拒绝
|
|
66
|
+
* XYSDK:950405 采集流约束设置为空
|
|
67
|
+
* XYSDK:950406 创建媒体流失败
|
|
68
|
+
*/
|
|
16
69
|
export declare const STREAM_ERROR_CODE_MAP: string[];
|
|
70
|
+
/**
|
|
71
|
+
* 采集流重创建错误码
|
|
72
|
+
*
|
|
73
|
+
* XYSDK:950403 约束设置无法被满足
|
|
74
|
+
* XYSDK:950405 采集流约束设置为空
|
|
75
|
+
* XYSDK:950406 创建媒体流失败
|
|
76
|
+
*/
|
|
17
77
|
export declare const STREAM_RECREATE_CODE_MAP: string[];
|
|
18
78
|
/**
|
|
19
79
|
* 失效的StreamStatus列表
|
|
@@ -215,7 +275,7 @@ export declare const DEFAULT_LAYOUT_CONFIG: Required<LayoutConfig>;
|
|
|
215
275
|
/**
|
|
216
276
|
* Web支持的轮询画面
|
|
217
277
|
*/
|
|
218
|
-
export declare const MULTI_IMAGE:
|
|
278
|
+
export declare const MULTI_IMAGE: CustomizedMode[];
|
|
219
279
|
/**
|
|
220
280
|
* 高分辨率配置
|
|
221
281
|
*/
|
package/main/layout/index.d.ts
CHANGED
|
@@ -195,6 +195,11 @@ export default class LayoutManager {
|
|
|
195
195
|
* 创建自定义布局的LayoutMap数据
|
|
196
196
|
*/
|
|
197
197
|
private initCustomLayoutMap;
|
|
198
|
+
/**
|
|
199
|
+
* 自动布局模式下,基于不同的场景分发创建布局
|
|
200
|
+
* 支持:通用布局模式和多画面布局模式
|
|
201
|
+
*/
|
|
202
|
+
invokeCreateLayout(): void;
|
|
198
203
|
/**
|
|
199
204
|
* [AUTO] : 基于 new layout result 消息生成 customLayoutMap 数据,并diff对比更新数据
|
|
200
205
|
*
|
|
@@ -202,13 +207,16 @@ export default class LayoutManager {
|
|
|
202
207
|
*/
|
|
203
208
|
createAutoLayout(totalLayoutResultList: ILayoutRoster[]): void;
|
|
204
209
|
/**
|
|
205
|
-
*
|
|
210
|
+
* 自动布局-创建多画面布局Layout数据
|
|
206
211
|
*/
|
|
207
|
-
|
|
212
|
+
createMultiViewLayout(): void;
|
|
208
213
|
/**
|
|
209
|
-
*
|
|
214
|
+
* 自动布局-创建通用布局Layout数据
|
|
210
215
|
*/
|
|
211
216
|
createLayout(): void;
|
|
217
|
+
/**
|
|
218
|
+
* 发送content roster消息
|
|
219
|
+
*/
|
|
212
220
|
sendContentRosterMessage(): void;
|
|
213
221
|
/**
|
|
214
222
|
* Roster 排序
|
package/main/layout/polling.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as LayoutManager } from './index';
|
|
2
|
-
import {
|
|
2
|
+
import { XYMultiViewLayout, ILayout, IRoster, PollingState, TemplateMode } from '../../type/index';
|
|
3
3
|
import { default as Client } from '../client';
|
|
4
4
|
export default class Polling {
|
|
5
|
-
pollingMessage:
|
|
5
|
+
pollingMessage: XYMultiViewLayout | null;
|
|
6
6
|
private pollingIntervalTimer;
|
|
7
7
|
private pollingInterval;
|
|
8
8
|
private client;
|
|
@@ -16,6 +16,8 @@ export default class Polling {
|
|
|
16
16
|
private specifiedMap;
|
|
17
17
|
private speakerItem;
|
|
18
18
|
private autoPollingMap;
|
|
19
|
+
private autoFileUnjoined;
|
|
20
|
+
private autoFillEmptyScreen;
|
|
19
21
|
private pollingLayout;
|
|
20
22
|
private autoSpecified;
|
|
21
23
|
private customizedList;
|
|
@@ -26,22 +28,63 @@ export default class Polling {
|
|
|
26
28
|
private isPollingConfigChange;
|
|
27
29
|
private isForceUpdateMode;
|
|
28
30
|
private cacheIsPolling;
|
|
31
|
+
private ftRoster;
|
|
32
|
+
private cacheCustomizedLayout;
|
|
29
33
|
constructor(client: Client, layout: LayoutManager);
|
|
30
|
-
|
|
34
|
+
/**
|
|
35
|
+
* 获取排序后的成员列表
|
|
36
|
+
*
|
|
37
|
+
* @returns { IRoster[] } - 排序后的成员列表
|
|
38
|
+
*/
|
|
39
|
+
getSortedRosterList(): IRoster[];
|
|
40
|
+
/**
|
|
41
|
+
* 获取轮询状态
|
|
42
|
+
*
|
|
43
|
+
* @returns { PollingState } - 轮询状态
|
|
44
|
+
*/
|
|
31
45
|
getPollingState(): PollingState;
|
|
46
|
+
/**
|
|
47
|
+
* 获取轮询多画面布局
|
|
48
|
+
*
|
|
49
|
+
* @returns { ILayout[] } - 轮询多画面布局
|
|
50
|
+
*/
|
|
32
51
|
getPollingLayout(): ILayout[];
|
|
33
52
|
/**
|
|
34
53
|
* 处理轮询多画面消息
|
|
35
54
|
*
|
|
36
|
-
* @param { string } customizedLayout -
|
|
55
|
+
* @param { string } customizedLayout - 会控上报的多画面消息字符串,包含统一多画面/轮询多画面、AVC、SVC等布局模式
|
|
37
56
|
*/
|
|
38
57
|
handleCustomizedLayout(customizedLayout: string): void;
|
|
39
58
|
/**
|
|
40
|
-
*
|
|
59
|
+
* 停止多画面布局
|
|
60
|
+
*/
|
|
61
|
+
stopMultiViewLayout(): void;
|
|
62
|
+
/**
|
|
63
|
+
* 处理会控多画面-AVC布局消息
|
|
64
|
+
*
|
|
65
|
+
* @param { XYMultiViewLayout } params - 多画面数据
|
|
66
|
+
*/
|
|
67
|
+
private handleAVCLayoutMessage;
|
|
68
|
+
/**
|
|
69
|
+
* 处理会控轮询多画面-SVC布局消息
|
|
70
|
+
*
|
|
71
|
+
* @param { XYMultiViewLayout } params - 多画面数据
|
|
72
|
+
*/
|
|
73
|
+
private handlePollingLayoutMessage;
|
|
74
|
+
/**
|
|
75
|
+
* 开始轮询多画面
|
|
76
|
+
*
|
|
77
|
+
* @param { XYMultiViewLayout } params - 轮询多画面数据
|
|
78
|
+
*/
|
|
79
|
+
startPollingLayout(params: XYMultiViewLayout): void;
|
|
80
|
+
/**
|
|
81
|
+
* 转换多画面列表类型为自动模式
|
|
41
82
|
*
|
|
42
|
-
* @param {
|
|
83
|
+
* @param { CustomizedItem[] } detail - 多画面列表
|
|
84
|
+
* @param { boolean } auto - 是否是自动分配模式
|
|
85
|
+
* @returns { CustomizedItem[] } - 转换后的多画面列表
|
|
43
86
|
*/
|
|
44
|
-
|
|
87
|
+
private convertDetailListToAutoType;
|
|
45
88
|
/**
|
|
46
89
|
* 获取当前轮询布局模式
|
|
47
90
|
*
|
|
@@ -49,9 +92,20 @@ export default class Polling {
|
|
|
49
92
|
*/
|
|
50
93
|
getTemplateMode(): TemplateMode;
|
|
51
94
|
/**
|
|
52
|
-
*
|
|
95
|
+
* 多画面布局-执行多画面操作:启动/暂停
|
|
53
96
|
*/
|
|
54
|
-
|
|
97
|
+
operateMultiViewLayout(): void;
|
|
98
|
+
/**
|
|
99
|
+
* 处理多画面AVC/轮询AVC模式启动轮询多画面操作
|
|
100
|
+
*
|
|
101
|
+
* 1、生成基础的请流LayoutMap数据
|
|
102
|
+
* 2、请流布局
|
|
103
|
+
*/
|
|
104
|
+
private handleStartAVCLayout;
|
|
105
|
+
/**
|
|
106
|
+
* 创建多画面AVC布局
|
|
107
|
+
*/
|
|
108
|
+
private createAVCLayout;
|
|
55
109
|
/**
|
|
56
110
|
* 启动轮询多画面
|
|
57
111
|
*/
|
|
@@ -67,7 +121,7 @@ export default class Polling {
|
|
|
67
121
|
/**
|
|
68
122
|
* 判断轮询多画面配置是否变动
|
|
69
123
|
*
|
|
70
|
-
* @param {
|
|
124
|
+
* @param { XYMultiViewLayout } params - 轮询多画面配置参数
|
|
71
125
|
* @returns { boolean } - 是否变动
|
|
72
126
|
*/
|
|
73
127
|
private checkPollingConfigChange;
|
|
@@ -216,6 +270,10 @@ export default class Polling {
|
|
|
216
270
|
* @param { string } customId - 自定义Id
|
|
217
271
|
*/
|
|
218
272
|
private setPollingLayoutItem;
|
|
273
|
+
/**
|
|
274
|
+
* 创建多画面AVC请流列表
|
|
275
|
+
*/
|
|
276
|
+
private createAVCRequestNewLayout;
|
|
219
277
|
/**
|
|
220
278
|
* 根据pollingLayout创建请流列表
|
|
221
279
|
*/
|
package/main/layout/state.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { XYBaseModule } from '../../interface/baseModule.type';
|
|
2
2
|
import { default as LayoutManager } from './index';
|
|
3
3
|
import { default as Client } from '../client';
|
|
4
|
-
import { ContentTemplateMode, LayoutConfig, TemplateMode } from '../../type/index';
|
|
4
|
+
import { ContentTemplateMode, LayoutConfig, TemplateMode, XYCurrentMultiLayoutType } from '../../type/index';
|
|
5
5
|
export declare class XYLayoutManagerState implements XYBaseModule {
|
|
6
6
|
private client;
|
|
7
7
|
private logger;
|
|
@@ -15,7 +15,45 @@ export declare class XYLayoutManagerState implements XYBaseModule {
|
|
|
15
15
|
private layoutConfig;
|
|
16
16
|
private templateMode;
|
|
17
17
|
private cacheTemplateMode;
|
|
18
|
+
private currentMultiLayoutType;
|
|
18
19
|
constructor(client: Client, layout: LayoutManager);
|
|
20
|
+
/**
|
|
21
|
+
* 获取当前轮询多画面布局类型
|
|
22
|
+
*
|
|
23
|
+
* @returns { XYCurrentMultiLayoutType } - 当前轮询多画面布局类型 支持轮询SVC、轮询AVC、多画面AVC
|
|
24
|
+
*/
|
|
25
|
+
getCurrentMultiLayoutType(): XYCurrentMultiLayoutType;
|
|
26
|
+
/**
|
|
27
|
+
* 设置当前轮询多画面布局类型
|
|
28
|
+
*
|
|
29
|
+
* @param { XYCurrentMultiLayoutType } type - 新的布局类型
|
|
30
|
+
* @returns { XYCurrentMultiLayoutType } - 新的布局类型
|
|
31
|
+
*/
|
|
32
|
+
setCurrentMultiLayoutType(type: XYCurrentMultiLayoutType): XYCurrentMultiLayoutType;
|
|
33
|
+
/**
|
|
34
|
+
* 是否是多画面AVC或轮询多画面AVC布局
|
|
35
|
+
*
|
|
36
|
+
* @returns { boolean } - 是否是多画面AVC或轮询多画面AVC布局
|
|
37
|
+
*/
|
|
38
|
+
isMultiAVCLayout(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* 是否是轮询/多画面SVC布局
|
|
41
|
+
*
|
|
42
|
+
* @returns { boolean } - 是否是轮询SVC布局
|
|
43
|
+
*/
|
|
44
|
+
isMultiSVCLayout(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* 是否是多画面SVC布局
|
|
47
|
+
*
|
|
48
|
+
* @returns { boolean } - 是否是多画面布局
|
|
49
|
+
*/
|
|
50
|
+
isMultiViewLayout(): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* 是否是轮询SVC布局
|
|
53
|
+
*
|
|
54
|
+
* @returns { boolean } - 是否是轮询SVC布局
|
|
55
|
+
*/
|
|
56
|
+
isPollingSVCLayout(): boolean;
|
|
19
57
|
/**
|
|
20
58
|
* 获取Layout Config配置信息
|
|
21
59
|
*
|
|
@@ -132,11 +170,14 @@ export declare class XYLayoutManagerState implements XYBaseModule {
|
|
|
132
170
|
*/
|
|
133
171
|
setForceFullScreenId(id: string): string;
|
|
134
172
|
/**
|
|
135
|
-
*
|
|
173
|
+
* 判断是否应该使用自动布局下的通用布局模式
|
|
174
|
+
* 支持:通用布局模式/多画面布局模式(包含轮询多画面)
|
|
136
175
|
*
|
|
137
|
-
*
|
|
176
|
+
* 场景:在自动布局模式下,根据会议状态判断使用通用布局还是多画面布局
|
|
177
|
+
* - 通用布局:适用于正常会议场景布局,例如焦点画面,分页,宫格布局,演讲者布局,Content布局等;
|
|
178
|
+
* - 多画面布局:适用于多画面,轮询多画面下的AVC/SVC布局;
|
|
138
179
|
*/
|
|
139
|
-
|
|
180
|
+
shouldUseGeneralLayout(): boolean;
|
|
140
181
|
/**
|
|
141
182
|
* 获取Layout布局状态
|
|
142
183
|
*
|
|
@@ -147,7 +188,7 @@ export declare class XYLayoutManagerState implements XYBaseModule {
|
|
|
147
188
|
isInDialogMode: boolean;
|
|
148
189
|
isContentMode: boolean;
|
|
149
190
|
isPolling: boolean;
|
|
150
|
-
|
|
191
|
+
isSwitchToGeneralLayout: boolean;
|
|
151
192
|
};
|
|
152
193
|
/**
|
|
153
194
|
* 资源销毁
|
package/main/meeting/index.d.ts
CHANGED
|
@@ -30,6 +30,11 @@ declare class Meeting {
|
|
|
30
30
|
getConferenceInfo(): IConferenceInfo;
|
|
31
31
|
getEnterpriseConfig(): IEnterpriseConfig;
|
|
32
32
|
getLayoutAvatarType(): LayoutAvatarType;
|
|
33
|
+
/**
|
|
34
|
+
* 获取会控消息
|
|
35
|
+
*
|
|
36
|
+
* @returns { IMeetingControl } 会控消息
|
|
37
|
+
*/
|
|
33
38
|
getMeetingControlInfo(): IMeetingControl | null;
|
|
34
39
|
/**
|
|
35
40
|
* 清空已退会的终端头像
|
package/main/peer/index.d.ts
CHANGED
|
@@ -20,7 +20,8 @@ export default class Peer extends State {
|
|
|
20
20
|
private videoCodecs;
|
|
21
21
|
private audioCodecs;
|
|
22
22
|
private qualityWorker;
|
|
23
|
-
private
|
|
23
|
+
private localCandidateInfo;
|
|
24
|
+
private remoteCandidateInfo;
|
|
24
25
|
private peerLibStatus;
|
|
25
26
|
private firstCallState;
|
|
26
27
|
private peerCallState;
|
|
@@ -31,3 +31,39 @@ export interface XYStreamParameterConfig {
|
|
|
31
31
|
export interface XYRTCSessionDescriptionInit extends RTCSessionDescriptionInit {
|
|
32
32
|
offerKey?: string;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* 协商网络信息
|
|
36
|
+
*
|
|
37
|
+
* @property { string } address - 地址
|
|
38
|
+
* @property { string } candidateType - 候选类型
|
|
39
|
+
* @property { string } foundation - 基础
|
|
40
|
+
* @property { string } id - ID
|
|
41
|
+
* @property { string } ip - 本地/远端IP
|
|
42
|
+
* @property { boolean } isRemote - 是否远程
|
|
43
|
+
* @property { string } networkType - 网络类型
|
|
44
|
+
* @property { number } port - 端口
|
|
45
|
+
* @property { number } priority - 优先级
|
|
46
|
+
* @property { string } protocol - 协议
|
|
47
|
+
* @property { string } relatedAddress - 协商真实的IP
|
|
48
|
+
* @property { number } relatedPort - 协商真实的端口
|
|
49
|
+
* @property { number } timestamp - 时间戳
|
|
50
|
+
* @property { string } type - 类型
|
|
51
|
+
* @property { string } usernameFragment - 用户名片段
|
|
52
|
+
*/
|
|
53
|
+
export interface XYCandidateInfo {
|
|
54
|
+
address?: string;
|
|
55
|
+
candidateType?: string;
|
|
56
|
+
foundation?: string;
|
|
57
|
+
id?: string;
|
|
58
|
+
ip?: string;
|
|
59
|
+
isRemote?: boolean;
|
|
60
|
+
networkType?: string;
|
|
61
|
+
port?: number;
|
|
62
|
+
priority?: number;
|
|
63
|
+
protocol?: string;
|
|
64
|
+
relatedAddress?: string;
|
|
65
|
+
relatedPort?: number;
|
|
66
|
+
timestamp?: number;
|
|
67
|
+
type?: string;
|
|
68
|
+
usernameFragment?: string;
|
|
69
|
+
}
|
package/main/quality/index.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ declare class Quality {
|
|
|
3
3
|
currentInternals: IInternals;
|
|
4
4
|
nextInternals: IInternals;
|
|
5
5
|
private bytesReceivedSecond;
|
|
6
|
+
private bytesReceivedTotalSecond;
|
|
6
7
|
private bytesSentSecond;
|
|
8
|
+
private bytesSentTotalSecond;
|
|
7
9
|
private packetsSentSecondSum;
|
|
8
10
|
private packetsSentLostSecondSum;
|
|
9
11
|
private packetsReceivedSecondSum;
|
|
@@ -18,10 +20,14 @@ declare class Quality {
|
|
|
18
20
|
private currentLogInterval;
|
|
19
21
|
private currentReportInterval;
|
|
20
22
|
private networkType;
|
|
23
|
+
private localOuterIP;
|
|
21
24
|
private localInternalIP;
|
|
22
25
|
private localPort;
|
|
23
26
|
private remoteIP;
|
|
24
27
|
private remotePort;
|
|
28
|
+
private currentRoundTripTime;
|
|
29
|
+
private senderRoundTripTime;
|
|
30
|
+
private cacheCandidatePair;
|
|
25
31
|
private onMessage;
|
|
26
32
|
constructor(onMessage: (eventData: any) => void);
|
|
27
33
|
/**
|
|
@@ -52,6 +58,19 @@ declare class Quality {
|
|
|
52
58
|
* @param { IWorkerVideoReceiver[] } senderStatsList - 原始质量数据
|
|
53
59
|
*/
|
|
54
60
|
statsSender(senderStatsList: IWorkerVideoReceiver[]): void;
|
|
61
|
+
/**
|
|
62
|
+
* 第四步:处理协商网络信息
|
|
63
|
+
*
|
|
64
|
+
* @param { IWorkerVideoReceiver[] } senderStatsList - 原始质量数据
|
|
65
|
+
*/
|
|
66
|
+
statsCandidate(data: any): void;
|
|
67
|
+
/**
|
|
68
|
+
* 更新候选对信息
|
|
69
|
+
* 包含:availableOutgoingBitrate、bytesSent、bytesReceived、currentRoundTripTime等信息
|
|
70
|
+
*
|
|
71
|
+
* @param { any } report - 候选对信息
|
|
72
|
+
*/
|
|
73
|
+
private updateCandidatePair;
|
|
55
74
|
/**
|
|
56
75
|
* 通过Worker发送最终的质量统计数据
|
|
57
76
|
*/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface XYCandidatePairInfo {
|
|
2
|
+
id: string;
|
|
3
|
+
timestamp: number;
|
|
4
|
+
type: string;
|
|
5
|
+
availableOutgoingBitrate: number;
|
|
6
|
+
bytesDiscardedOnSend: number;
|
|
7
|
+
bytesReceived: number;
|
|
8
|
+
bytesSent: number;
|
|
9
|
+
consentRequestsSent: number;
|
|
10
|
+
currentRoundTripTime: number;
|
|
11
|
+
lastPacketSentTimestamp: number;
|
|
12
|
+
localCandidateId: string;
|
|
13
|
+
nominated: boolean;
|
|
14
|
+
packetsDiscardedOnSend: number;
|
|
15
|
+
packetsReceived: number;
|
|
16
|
+
packetsSent: number;
|
|
17
|
+
priority: number;
|
|
18
|
+
remoteCandidateId: string;
|
|
19
|
+
requestsReceived: number;
|
|
20
|
+
requestsSent: number;
|
|
21
|
+
responsesReceived: number;
|
|
22
|
+
responsesSent: number;
|
|
23
|
+
state: 'succeeded' | 'in-progress' | 'failed' | string;
|
|
24
|
+
totalRoundTripTime: number;
|
|
25
|
+
transportId: string;
|
|
26
|
+
writable: boolean;
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylink/xy-rtc-sdk",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.8",
|
|
4
4
|
"author": "jinghui-Luo",
|
|
5
5
|
"email": "luojinghui424@gmail.com",
|
|
6
6
|
"bugs": {
|
|
@@ -23,13 +23,12 @@
|
|
|
23
23
|
"@types/uuid": "^10.0.0",
|
|
24
24
|
"@xylink/xy-encryption": "^1.0.20",
|
|
25
25
|
"@xylink/xy_api_gateway": "0.4.9-lite.6",
|
|
26
|
-
"@xylink/xy-toolkit": "^1.0.
|
|
26
|
+
"@xylink/xy-toolkit": "^1.0.1",
|
|
27
27
|
"axios": "^1.7.2",
|
|
28
28
|
"clone-deep": "^4.0.1",
|
|
29
29
|
"dexie": "^4.0.8",
|
|
30
30
|
"dexie-export-import": "^4.1.2",
|
|
31
31
|
"downloadjs": "^1.4.7",
|
|
32
|
-
"encryptlong": "^3.1.4",
|
|
33
32
|
"js-base64": "^3.7.7",
|
|
34
33
|
"js-sha512": "^0.9.0",
|
|
35
34
|
"jszip": "^3.10.1",
|
package/type/client.d.ts
CHANGED
|
@@ -379,12 +379,14 @@ export type IOPERATE_MAP = {
|
|
|
379
379
|
* @property { StreamResolutionLevel } resolution - 必填,指定画面分辨率
|
|
380
380
|
* @property { VideoQuality } quality - 必填,指定视频质量,建议people画面使用0或者1,content画面使用2
|
|
381
381
|
* @property { number } mediagroupid - 必填,指定设备的类型,可选:0|1,0代表people画面,1代表content共享画面
|
|
382
|
+
* @property { string } avcLayout - 可选,AVC布局信息,用于多画面/轮询AVC请流,默认情况不需要填写此内容
|
|
382
383
|
*/
|
|
383
384
|
export type IReqInfo = {
|
|
384
385
|
calluri: string;
|
|
385
386
|
resolution: StreamResolutionLevel;
|
|
386
387
|
quality: VideoQuality;
|
|
387
388
|
mediagroupid: number;
|
|
389
|
+
avcLayout?: string;
|
|
388
390
|
};
|
|
389
391
|
/**
|
|
390
392
|
* 会议相关信息, 用于接口请求参数
|
|
@@ -1052,21 +1054,22 @@ export interface IReceiveCustomMessage {
|
|
|
1052
1054
|
* SDK功能控制开关,是否启用某些功能的运行
|
|
1053
1055
|
* 默认配置:src/enum/index.ts DEFAULT_FEATURE_CONFIG
|
|
1054
1056
|
*
|
|
1055
|
-
* @property { boolean } enableMeetingShout 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音
|
|
1056
|
-
* @property { boolean } enableV2States 是否启用小鱼数据上报功能,默认启用,设置为true
|
|
1057
|
-
* @property { boolean } enableCheckRecordPermission 是否启用录制权限查询功能,默认不启用,设置为false
|
|
1058
|
-
* @property { boolean } enableBandwidthSetting
|
|
1059
|
-
* @property { boolean } enableMeetingInvite 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false
|
|
1060
|
-
* @property { boolean } enableMeetingOwner 是否启用查询会议Owner信息,默认不启用,设置为false
|
|
1061
|
-
* @property { boolean } enableAutoResizeLayout 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true
|
|
1062
|
-
* @property { boolean } enableLowResolution 是否启用低性能模式,降低发送和接收端的分辨率和质量,默认不启用,设置为false
|
|
1063
|
-
* @property { boolean } enableSpeakerInfo 是否启用推送实时讲话人信息,每秒2条消息推送,默认不启用,设置为false
|
|
1064
|
-
* @property { boolean } enableLayoutAvatar 是否启用获取参会者头像,默认不启用,设置为false
|
|
1065
|
-
* @property { boolean } enableMobileNotAuth 移动端是否支持无授权入会, 默认设置为false
|
|
1066
|
-
* @property { boolean } enableWatermarkContent 是否启用获取content水印内容, 默认启用, 设置为true
|
|
1067
|
-
* @property { boolean } enableHideLocalView 是否启用隐藏本地画面模式,默认不启用,设置为false
|
|
1068
|
-
* @property { boolean } enableAudioPCM 是否启用音频PCM,默认不启用,设置为false
|
|
1069
|
-
* @property { boolean } enableReCall 是否支持重新呼叫, 默认启用, 设置为true
|
|
1057
|
+
* @property { boolean } enableMeetingShout - 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音
|
|
1058
|
+
* @property { boolean } enableV2States - 是否启用小鱼数据上报功能,默认启用,设置为true
|
|
1059
|
+
* @property { boolean } enableCheckRecordPermission - 是否启用录制权限查询功能,默认不启用,设置为false
|
|
1060
|
+
* @property { boolean } enableBandwidthSetting - 是否启用管理平台带宽控制(双向),是否可以请1080P的视频流,默认不启用,设置为false
|
|
1061
|
+
* @property { boolean } enableMeetingInvite - 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false
|
|
1062
|
+
* @property { boolean } enableMeetingOwner - 是否启用查询会议Owner信息,默认不启用,设置为false
|
|
1063
|
+
* @property { boolean } enableAutoResizeLayout - 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true
|
|
1064
|
+
* @property { boolean } enableLowResolution - 是否启用低性能模式,降低发送和接收端的分辨率和质量,默认不启用,设置为false
|
|
1065
|
+
* @property { boolean } enableSpeakerInfo - 是否启用推送实时讲话人信息,每秒2条消息推送,默认不启用,设置为false
|
|
1066
|
+
* @property { boolean } enableLayoutAvatar - 是否启用获取参会者头像,默认不启用,设置为false
|
|
1067
|
+
* @property { boolean } enableMobileNotAuth - 移动端是否支持无授权入会, 默认设置为false
|
|
1068
|
+
* @property { boolean } enableWatermarkContent - 是否启用获取content水印内容, 默认启用, 设置为true
|
|
1069
|
+
* @property { boolean } enableHideLocalView - 是否启用隐藏本地画面模式,默认不启用,设置为false
|
|
1070
|
+
* @property { boolean } enableAudioPCM - 是否启用音频PCM,默认不启用,设置为false
|
|
1071
|
+
* @property { boolean } enableReCall - 是否支持重新呼叫, 默认启用, 设置为true
|
|
1072
|
+
* @property { boolean } enableMoreStreams - 是否支持20路画面流,默认不启用,设置为false
|
|
1070
1073
|
*/
|
|
1071
1074
|
export interface IFeatureConfig {
|
|
1072
1075
|
enableMeetingShout?: boolean;
|
|
@@ -1084,6 +1087,7 @@ export interface IFeatureConfig {
|
|
|
1084
1087
|
enableHideLocalView?: boolean;
|
|
1085
1088
|
enableAudioPCM?: boolean;
|
|
1086
1089
|
enableReCall?: boolean;
|
|
1090
|
+
enableMoreStreams?: boolean;
|
|
1087
1091
|
}
|
|
1088
1092
|
/**
|
|
1089
1093
|
* SDK功能控制开关的key
|