@xylink/xy-rtc-sdk 4.0.7 → 4.0.9

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 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
- 详细集成流程参考[详细 API 文档](https://openapi.xylink.com/common/meeting/api/description?platform=web)完成音视频通话。
54
+ 详细集成流程参考[视频通话](https://openapi.xylink.com/common/meeting/doc/video_call?platform=web)文档;
45
55
 
46
56
  ## 开源示例项目
47
57
 
@@ -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
- export declare const STREAM_CHANNEL_COUNT = 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 = 34;
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列表
@@ -179,6 +239,16 @@ export declare const FACING_MODE_LIST: readonly [FacingMode.FRONT, FacingMode.BA
179
239
  * @property upLinkCeilingRate - 上行带宽配置(暂不支持)
180
240
  * @property pvrxResolution - 下行最大分辨率配置
181
241
  * @property pvtxResolution - 上行最大分辨率配置
242
+ * @property bwMode - 带宽模式配置
243
+ * 高低带宽模式设置路径:manager-开发者-客户端功能管理-自定义终端功能-mediaConfig-bwMode,支持:0/4
244
+ * 最大带宽设置路径:console-会议设置-带宽控制-默认带宽,最大支持20MB设置
245
+ * 最大带宽设置路径2:manager-开发者-客户端功能管理-自定义终端功能-RemoteSDKConfig-downLinkCeilingRate,可以输入自定义带宽,会合并到console平台
246
+ * 需求文档:https://nones.xylink.com/wiki/#/team/AQzvsooq/space/WctinJ2n/page/Aoro2gn1
247
+ * 0-本地带宽表;未配置带宽模式时,终端默认使用0-本地带宽表
248
+ * 1-极限模式----暂时不支持
249
+ * 2-低带宽模式----暂时不支持
250
+ * 3-普通模式----暂时不支持
251
+ * 4-高带宽模式-----20260327支持
182
252
  */
183
253
  export declare const ENTERPRISE_CONFIG: {
184
254
  downLinkCeilingRate: {
@@ -197,6 +267,10 @@ export declare const ENTERPRISE_CONFIG: {
197
267
  clientConfigName: string;
198
268
  configName: string;
199
269
  };
270
+ bwMode: {
271
+ clientConfigName: string;
272
+ configName: string;
273
+ };
200
274
  };
201
275
  /**
202
276
  * 枚举会控平台
@@ -215,7 +289,7 @@ export declare const DEFAULT_LAYOUT_CONFIG: Required<LayoutConfig>;
215
289
  /**
216
290
  * Web支持的轮询画面
217
291
  */
218
- export declare const MULTI_IMAGE: string[];
292
+ export declare const MULTI_IMAGE: CustomizedMode[];
219
293
  /**
220
294
  * 高分辨率配置
221
295
  */
@@ -60,15 +60,39 @@ export declare enum XYLoginState {
60
60
  */
61
61
  TokenRefresh = "TokenRefresh"
62
62
  }
63
+ /**
64
+ * 密码组成
65
+ *
66
+ * @property { boolean } digit - 是否包含数字
67
+ * @property { boolean } lowerCase - 是否包含小写字母
68
+ * @property { boolean } specialChar - 是否包含特殊字符
69
+ * @property { boolean } upperCase - 是否包含大写字母
70
+ */
71
+ export interface XYPasswordComposition {
72
+ digit: boolean;
73
+ lowerCase: boolean;
74
+ specialChar: boolean;
75
+ upperCase: boolean;
76
+ }
63
77
  /**
64
78
  * 小鱼账号配置
65
79
  *
66
80
  * @property { boolean } enhancePassword - 不校验密码安全策略
67
- * @property { number } passwordLength - 密码长度(暂时无用)
81
+ * @property { string } passwordLength - 密码长度(格式: 8-16)
82
+ * @property { XYPasswordComposition } passwordComposition - 密码组成
83
+ * @property { number } passwordMaxLength - 密码最大长度
84
+ * @property { number } passwordMinLength - 密码最小长度
85
+ * @property { string } passwordValidationRegex - 密码验证正则表达式
86
+ * @property { string } enhancedPasswordRegex - 增强密码验证正则表达式, 兼容登录密码规则
68
87
  */
69
88
  export interface XYAccountConfig {
70
89
  enhancePassword: boolean;
71
- passwordLength: number;
90
+ passwordLength: string;
91
+ passwordComposition?: XYPasswordComposition;
92
+ passwordMaxLength?: number;
93
+ passwordMinLength?: number;
94
+ passwordValidationRegex?: string;
95
+ enhancedPasswordRegex?: string;
72
96
  }
73
97
  /**
74
98
  * 重置密码参数
@@ -77,10 +101,12 @@ export interface XYAccountConfig {
77
101
  * @property { string } password - 旧密码, 如果是验证码登录,此值可不传
78
102
  * @property { string } newPassword - 新密码
79
103
  * @property { string } verificationCode - 验证码, 如果是账号密码登录,此值可不传
104
+ * @property { boolean } enhancePassword - 是否增强密码
80
105
  */
81
106
  export interface XYResetPasswordParams {
82
107
  account: string;
83
108
  password?: string;
84
109
  newPassword: string;
85
110
  verificationCode?: string;
111
+ enhancePassword?: boolean;
86
112
  }
@@ -440,6 +440,10 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
440
440
  * @property { boolean } config.enableMobileNotAuth - 是否启用移动端无授权入会,默认不启用,设置为false;此配置已经废弃,移动端已支持动态授权功能;
441
441
  * @property { boolean } config.enableWatermarkContent - 是否启用获取content水印内容, 默认启用, 设置为true
442
442
  * @property { boolean } config.enableHideLocalView - 是否启用隐藏本地画面模式,默认不启用,设置为false
443
+ * @property { boolean } config.enableAudioPCM - 是否启用音频PCM,默认不启用,设置为false
444
+ * @property { boolean } config.enableReCall - 是否支持重新呼叫, 默认启用, 设置为true
445
+ * @property { boolean } config.enableMoreStreams - 是否支持更多画面流,默认不启用,设置为false,后续仅配置moreStreamsMaxCount即可;如配置为true,则自动转为18路画面流
446
+ * @property { XYMoreStreamsMaxCount } config.moreStreamsMaxCount - 配置更多画面流的最大数量,默认是9,支持9/18/32路画面流,如配置为其他枚举/数值,则自动转为9画面
443
447
  * @returns { IReturnResult }
444
448
  */
445
449
  setFeatureConfig(config: IFeatureConfig): Promise<IReturnResult>;
@@ -457,6 +461,14 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
457
461
  * @param { IFeatureConfigKey } key - Feature Config Key
458
462
  */
459
463
  private processFeatureConfig;
464
+ /**
465
+ * 合并更多画面流配置
466
+ * 规则:
467
+ * 1、如果配置了enableMoreStreams,则将moreStreamsMaxCount配置为EIGHTEEN 18路画面流
468
+ * 2、如果配置了moreStreamsMaxCount,且符合配置规则,则更新对应moreStreamsMaxCount配置;
469
+ * 3、如果配置了moreStreamsMaxCount,且不符合配置规则,则重置moreStreamsMaxCount配置为NINE;
470
+ */
471
+ private mergeMoreStreamsConfig;
460
472
  /**
461
473
  * 设置上下行视频的分辨率和帧率
462
474
  *
@@ -1005,7 +1017,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
1005
1017
  * @param { object? } extParams - 可选,控制额外的参数
1006
1018
  * @returns { Promise<boolean> } - 是否请求成功
1007
1019
  */
1008
- requestNewLayout(reqList: any, maxViewCountPerPage: number, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
1020
+ requestNewLayout(reqList: any, maxViewCountPerPage: number | undefined, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
1009
1021
  /**
1010
1022
  * 自定义布局-自动轮询请求参会者的视频流
1011
1023
  * 使用场景:教育平台调用全部画面数据
@@ -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
- * 计算自动轮询layout数据
210
+ * 自动布局-创建多画面布局Layout数据
206
211
  */
207
- createAutoPollingLayout(): void;
212
+ createMultiViewLayout(): void;
208
213
  /**
209
- * 创建Layout
214
+ * 自动布局-创建通用布局Layout数据
210
215
  */
211
216
  createLayout(): void;
217
+ /**
218
+ * 发送content roster消息
219
+ */
212
220
  sendContentRosterMessage(): void;
213
221
  /**
214
222
  * Roster 排序
@@ -1,8 +1,8 @@
1
1
  import { default as LayoutManager } from './index';
2
- import { ICustomizedLayout, ILayout, IRoster, PollingState, TemplateMode } from '../../type/index';
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: ICustomizedLayout | null;
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
- getOrderRoster(): IRoster[];
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 { ICustomizedLayout } params - 轮询多画面数据
83
+ * @param { CustomizedItem[] } detail - 多画面列表
84
+ * @param { boolean } auto - 是否是自动分配模式
85
+ * @returns { CustomizedItem[] } - 转换后的多画面列表
43
86
  */
44
- handlePollingMessage(params: ICustomizedLayout): void;
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
- operatePollingLayout(): void;
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 { ICustomizedLayout } params - 轮询多画面配置参数
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
  */
@@ -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
- getIsAutoLayout(): boolean;
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
- isSwitchAutoLayout: boolean;
191
+ isSwitchToGeneralLayout: boolean;
151
192
  };
152
193
  /**
153
194
  * 资源销毁
@@ -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
  * 清空已退会的终端头像
@@ -20,7 +20,8 @@ export default class Peer extends State {
20
20
  private videoCodecs;
21
21
  private audioCodecs;
22
22
  private qualityWorker;
23
- private localIPAddress;
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
+ }
@@ -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
  */