@xylink/xy-rtc-sdk 4.0.6 → 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.
Files changed (63) hide show
  1. package/README.md +16 -8
  2. package/action/ability.d.ts +82 -0
  3. package/action/api.d.ts +40 -3
  4. package/action/auth.d.ts +32 -1
  5. package/action/index.d.ts +4 -0
  6. package/action/index.type.d.ts +3 -1
  7. package/action/meeting.d.ts +20 -0
  8. package/enum/client.d.ts +3 -1
  9. package/enum/constraints.d.ts +88 -1
  10. package/enum/customizedkey.d.ts +10 -0
  11. package/enum/doc.d.ts +13 -0
  12. package/enum/errorCode/index.d.ts +3 -0
  13. package/enum/index.d.ts +63 -3
  14. package/enum/polling.d.ts +9 -0
  15. package/feature/artboard/index.d.ts +1 -0
  16. package/feature/customMessage/index.d.ts +7 -0
  17. package/feature/electron/index.d.ts +25 -0
  18. package/feature/index.d.ts +4 -0
  19. package/interface/contentTrackInterface.type.d.ts +0 -1
  20. package/interface/event.type.d.ts +13 -0
  21. package/main/auth/index.d.ts +12 -1
  22. package/main/auth/index.type.d.ts +24 -0
  23. package/main/client/index.d.ts +44 -5
  24. package/main/layout/index.d.ts +12 -4
  25. package/main/layout/polling.d.ts +199 -19
  26. package/main/layout/state.d.ts +46 -5
  27. package/main/media/index.d.ts +4 -0
  28. package/main/media/index.type.d.ts +11 -1
  29. package/main/meeting/control.d.ts +19 -2
  30. package/main/meeting/index.d.ts +26 -4
  31. package/main/meeting/index.type.d.ts +25 -4
  32. package/main/peer/index.d.ts +2 -1
  33. package/main/peer/index.type.d.ts +36 -0
  34. package/main/quality/index.d.ts +36 -0
  35. package/main/quality/index.type.d.ts +27 -0
  36. package/main/render/videoManager.d.ts +6 -2
  37. package/main/roster/index.d.ts +7 -0
  38. package/main/server/index.d.ts +1 -0
  39. package/main/signal/index.type.d.ts +5 -0
  40. package/main/signal/reconnection.d.ts +46 -0
  41. package/main/socket/index.d.ts +2 -2
  42. package/main/track/baseTrack.d.ts +7 -4
  43. package/main/track/contentCapture.d.ts +59 -0
  44. package/main/track/contentTrack.d.ts +50 -38
  45. package/main/track/helper.d.ts +2 -11
  46. package/package.json +4 -5
  47. package/tools/aes.d.ts +33 -0
  48. package/tools/log/db.d.ts +1 -1
  49. package/tools/socket/socketManager.d.ts +1 -0
  50. package/tools/utils.d.ts +8 -0
  51. package/type/ability.d.ts +3 -1
  52. package/type/action.d.ts +2 -0
  53. package/type/base.d.ts +13 -0
  54. package/type/client.d.ts +54 -19
  55. package/type/index.d.ts +3 -0
  56. package/type/logger.d.ts +13 -1
  57. package/type/meeting.d.ts +7 -13
  58. package/type/polling.d.ts +57 -13
  59. package/type/quality.d.ts +2 -0
  60. package/type/socket.d.ts +2 -0
  61. package/type/stream.d.ts +39 -9
  62. package/type/track.d.ts +95 -6
  63. package/xyrtc.js +19135 -15732
@@ -0,0 +1,25 @@
1
+ import { default as XYRTCClient } from '../../main/client';
2
+ import { XYBaseModule } from '../../type/index';
3
+ export declare class XYElectron implements XYBaseModule {
4
+ private client;
5
+ private logger;
6
+ constructor(client: XYRTCClient);
7
+ /**
8
+ * 检查Electron设备访问权限
9
+ */
10
+ checkElectronDeviceAccess(): Promise<void>;
11
+ /**
12
+ * 请求Electron设备访问权限
13
+ *
14
+ * @param { XYPermissionType } type - 权限类型
15
+ */
16
+ private requestElectronDeviceAccess;
17
+ /**
18
+ * 获取Electron桌面采集器
19
+ */
20
+ getDesktopCapturer(): any;
21
+ /**
22
+ * 销毁
23
+ */
24
+ destroy(): void;
25
+ }
@@ -27,3 +27,7 @@ export * from './query/index.type';
27
27
  */
28
28
  export { XYSpeaker } from './speaker';
29
29
  export * from './speaker/index.type';
30
+ /**
31
+ * Electron模块
32
+ */
33
+ export { XYElectron } from './electron';
@@ -2,7 +2,6 @@ import { ContentTrackConfig, IReturnResult, XYElectronSource } from '../type/ind
2
2
  export interface XYContentTrackIF {
3
3
  capture(config?: ContentTrackConfig): Promise<IReturnResult>;
4
4
  close(): void;
5
- createElectronContentStream(selectedSourceId: string): Promise<IReturnResult>;
6
5
  getElectronContentSources(desktopCapturer: any, types?: any): Promise<XYElectronSource[] | any>;
7
6
  pause(): Promise<IReturnResult>;
8
7
  resume(): Promise<IReturnResult>;
@@ -270,6 +270,14 @@ export declare enum XYClientEventKey {
270
270
  * 相关方法:获取视频的Stream数据方法:getVideoStream
271
271
  */
272
272
  VIDEO_TRACK = "video-track",
273
+ /**
274
+ * AI 合成语音TTS 状态事件
275
+ */
276
+ AI_TTS_STATUS = "ai-tts-status",
277
+ /**
278
+ * AI 数字人状态事件
279
+ */
280
+ AI_DIGITAL_HUMAN_STATUS = "ai-digital-human-status",
273
281
  /**
274
282
  * ==================分组:会议调度==================
275
283
  */
@@ -351,6 +359,11 @@ export declare enum XYClientEventKey {
351
359
  * 关联内容:高级功能-白板
352
360
  */
353
361
  ORI_VIDEO_SIZE = "origin-video-size",
362
+ /**
363
+ * 通话字幕、转写状态变更事件
364
+ * 关联内容:高级功能-通话字幕
365
+ */
366
+ TRANSCRIPTION_STATUS = "transcription-status",
354
367
  /**
355
368
  * ==================分组:其他==================
356
369
  */
@@ -1,6 +1,6 @@
1
1
  import { ILoginExtAccount, ISdkUserInfo, ILoginInfo, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, LoginTokenInfo, IReturnResult, LoginThirdAuthTokenParams, LoginVerifyCodeParams } from '../../type/index';
2
2
  import { default as XYRTCClient } from '../client';
3
- import { CheckCaptchaImageParams, LoginOtherParams } from './index.type';
3
+ import { CheckCaptchaImageParams, LoginOtherParams, XYResetPasswordParams } from './index.type';
4
4
  declare class Auth {
5
5
  private client;
6
6
  private logger;
@@ -148,5 +148,16 @@ declare class Auth {
148
148
  * 上报refresh token信息
149
149
  */
150
150
  private handleActionMessage;
151
+ /**
152
+ * 重置密码
153
+ *
154
+ * @param { XYResetPasswordParams } params - 重置密码参数
155
+ * @property { string } params.account - 用户账号
156
+ * @property { string } params.password - 旧密码
157
+ * @property { string } params.newPassword - 新密码
158
+ * @property { string } params.verificationCode - 验证码
159
+ * @returns { Promise<IReturnResult> } - 修改密码结果
160
+ */
161
+ resetPassword(params: XYResetPasswordParams): Promise<IReturnResult>;
151
162
  }
152
163
  export default Auth;
@@ -60,3 +60,27 @@ export declare enum XYLoginState {
60
60
  */
61
61
  TokenRefresh = "TokenRefresh"
62
62
  }
63
+ /**
64
+ * 小鱼账号配置
65
+ *
66
+ * @property { boolean } enhancePassword - 不校验密码安全策略
67
+ * @property { number } passwordLength - 密码长度(暂时无用)
68
+ */
69
+ export interface XYAccountConfig {
70
+ enhancePassword: boolean;
71
+ passwordLength: number;
72
+ }
73
+ /**
74
+ * 重置密码参数
75
+ *
76
+ * @property { string } account - 用户账号
77
+ * @property { string } password - 旧密码, 如果是验证码登录,此值可不传
78
+ * @property { string } newPassword - 新密码
79
+ * @property { string } verificationCode - 验证码, 如果是账号密码登录,此值可不传
80
+ */
81
+ export interface XYResetPasswordParams {
82
+ account: string;
83
+ password?: string;
84
+ newPassword: string;
85
+ verificationCode?: string;
86
+ }
@@ -22,12 +22,14 @@ import { XYSignal } from '../signal';
22
22
  import { default as ServerManager } from '../server';
23
23
  import { XYServerInfo } from '../server/index.type';
24
24
  import { XYEDU } from '../../feature/edu';
25
+ import { XYElectron } from '../../feature/index';
25
26
  import { default as RosterManager } from '../roster';
26
27
  import { XYIMClient } from '../../feature/im';
27
28
  import { XYMemberDepartment } from '../../feature/query/index.type';
28
- import { CheckCaptchaImageParams, LoginOtherParams } from '../auth/index.type';
29
+ import { CheckCaptchaImageParams, LoginOtherParams, XYResetPasswordParams } from '../auth/index.type';
29
30
  import { XY_WHITEBOARD_DATA } from '../../feature/artboard/index.type';
30
31
  import { XYVepManager } from '../../feature/vep';
32
+ import { XYReconnectionManager } from '../signal/reconnection';
31
33
  export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
32
34
  logger: Logger;
33
35
  private action;
@@ -68,6 +70,8 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
68
70
  private vepManager?;
69
71
  private translationManager;
70
72
  private socketManager;
73
+ private reconnectionManager;
74
+ private electron;
71
75
  private onDocumentChange;
72
76
  constructor(config: IClientConfig, logger: Logger);
73
77
  static instance: XYRTCClient;
@@ -107,6 +111,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
107
111
  getMeetingControl(): XYMeetingControl;
108
112
  getImClient(): XYIMClient | null;
109
113
  getVepManager(): XYVepManager | undefined;
114
+ getElectron(): XYElectron | null;
110
115
  /**
111
116
  * 获取服务器地址
112
117
  *
@@ -164,6 +169,19 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
164
169
  * 会控消息
165
170
  */
166
171
  getMeetingControlInfo(): import('../../type/index').IMeetingControl | null;
172
+ /**
173
+ * 重呼管理模块
174
+ *
175
+ * @returns { XYReconnectionManager }
176
+ */
177
+ getReconnectionManager(): XYReconnectionManager;
178
+ /**
179
+ * 获取Electron桌面采集器
180
+ *
181
+ * @since 4.0.5
182
+ * @returns { DesktopCapturer | null } - Electron桌面采集器
183
+ */
184
+ getDesktopCapturer(): any;
167
185
  /**
168
186
  * 设置Client相关信息
169
187
  *
@@ -354,6 +372,17 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
354
372
  * @returns { Promise<IReturnResult> } - 登录结果
355
373
  */
356
374
  loginXYLinkByVerifyCode(params: LoginVerifyCodeParams): Promise<IReturnResult>;
375
+ /**
376
+ * 重置密码
377
+ * 调用时机:登录后,重置密码时调用
378
+ * 使用场景:仅适用于小鱼账号登录(loginXYlinkAccount),其他登录方式不支持此功能
379
+ *
380
+ * @param { string } account - 用户账号
381
+ * @param { string } password - 旧密码
382
+ * @param { string } newPassword - 新密码
383
+ * @returns { Promise<IReturnResult> } - 修改密码结果
384
+ */
385
+ resetPassword(params: XYResetPasswordParams): Promise<IReturnResult>;
357
386
  /**
358
387
  * 获取图片验证码
359
388
  *
@@ -400,7 +429,8 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
400
429
  * @property { boolean } config.enableMeetingShout - 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音;
401
430
  * @property { boolean } config.enableV2States - 是否启用小鱼数据上报功能,默认启用,设置为true,支持会中动态切换;
402
431
  * @property { boolean } config.enableCheckRecordPermission - 是否启用录制权限查询功能,默认不启用,设置为false;
403
- * @property { boolean } config.enableBandwidthSetting - 是否启用管理平台带宽控制(双向),默认不启用,设置为false;
432
+ * @since 4.0.7 enableBandwidthSetting默认值改为true
433
+ * @property { boolean } config.enableBandwidthSetting - 是否启用管理平台带宽控制(双向),默认启用,设置为true;
404
434
  * @property { boolean } config.enableMeetingInvite - 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false;
405
435
  * @property { boolean } config.enableMeetingOwner - 是否启用查询会议Owner信息,默认不启用,设置为false;
406
436
  * @property { boolean } config.enableAutoResizeLayout - 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true;
@@ -1218,7 +1248,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
1218
1248
  * @param { string } displayName - 入会名称
1219
1249
  * @returns
1220
1250
  */
1221
- checkSensitiveWord(displayName: string): Promise<import('../meeting/index.type').XYSensitiveWords | null>;
1251
+ checkSensitiveWord(displayName: string): Promise<import('../../type/index').XYSensitiveWords | null>;
1222
1252
  /**
1223
1253
  * 获取个人云会议室信息
1224
1254
  */
@@ -1228,13 +1258,13 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
1228
1258
  *
1229
1259
  * @returns { Promise<XYEnterpriseInfo> } - 企业信息
1230
1260
  */
1231
- getEnterpriseInfo(): Promise<import('../meeting/index.type').XYEnterpriseInfo>;
1261
+ getEnterpriseInfo(): Promise<import('../../type/index').XYEnterpriseInfo>;
1232
1262
  /**
1233
1263
  * 获取管理平台角色相关权限,包含录制权限
1234
1264
  *
1235
1265
  * @returns { Promise<XYUicustomization> } - 权限信息
1236
1266
  */
1237
- getUicustomization(): Promise<import('../meeting/index.type').XYUicustomization>;
1267
+ getUicustomization(): Promise<import('../../type/index').XYUicustomization>;
1238
1268
  /**
1239
1269
  * 开始白板分享
1240
1270
  *
@@ -1339,6 +1369,15 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
1339
1369
  * @param { boolean } blockSendSocket - 可选,是否阻止发送Socket挂断消息,默认是false,不阻止
1340
1370
  */
1341
1371
  destroy(reason?: string, blockSendSocket?: boolean): Promise<boolean>;
1372
+ /**
1373
+ * 重置入会成功之后的会议信息
1374
+ */
1375
+ clearInvite(): void;
1376
+ /**
1377
+ * 异常情况下,停止某些操作并上报用户
1378
+ * 包含录制、白板(建行暂时不支持)等等
1379
+ */
1380
+ stopActionsAndReport(): void;
1342
1381
  /**
1343
1382
  * 关闭当前会议,重置数据和销毁相关资源
1344
1383
  */
@@ -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 排序
@@ -259,7 +267,7 @@ export default class LayoutManager {
259
267
  /**
260
268
  * 计算Layout Container的容器信息
261
269
  */
262
- calculateScreenInfo(): false | this;
270
+ calculateScreenInfo(): this;
263
271
  /**
264
272
  * 计算Layout Container的容器信息
265
273
  *
@@ -1,8 +1,8 @@
1
1
  import { default as LayoutManager } from './index';
2
- import { ICustomizedLayout, ILayout, IRoster, PollingState } 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;
@@ -10,39 +10,102 @@ export default class Polling {
10
10
  private logger;
11
11
  private skipMuteVideo;
12
12
  private skipUnjoined;
13
- private layoutManager;
13
+ private speakerPriority;
14
+ private isSetPollingSpeaker;
15
+ private isSymmetricLayout;
14
16
  private specifiedMap;
15
17
  private speakerItem;
16
18
  private autoPollingMap;
19
+ private autoFileUnjoined;
20
+ private autoFillEmptyScreen;
17
21
  private pollingLayout;
18
22
  private autoSpecified;
19
23
  private customizedList;
20
- private isHasSpeaker;
21
24
  private pollingMode;
25
+ private layoutManager;
26
+ private cacheUnmuteSpeakerRoster;
22
27
  private cachePollingPause;
23
28
  private isPollingConfigChange;
24
29
  private isForceUpdateMode;
25
30
  private cacheIsPolling;
31
+ private ftRoster;
32
+ private cacheCustomizedLayout;
26
33
  constructor(client: Client, layout: LayoutManager);
27
- getOrderRoster(): IRoster[];
34
+ /**
35
+ * 获取排序后的成员列表
36
+ *
37
+ * @returns { IRoster[] } - 排序后的成员列表
38
+ */
39
+ getSortedRosterList(): IRoster[];
40
+ /**
41
+ * 获取轮询状态
42
+ *
43
+ * @returns { PollingState } - 轮询状态
44
+ */
28
45
  getPollingState(): PollingState;
46
+ /**
47
+ * 获取轮询多画面布局
48
+ *
49
+ * @returns { ILayout[] } - 轮询多画面布局
50
+ */
29
51
  getPollingLayout(): ILayout[];
30
52
  /**
31
53
  * 处理轮询多画面消息
32
54
  *
33
- * @param { string } customizedLayout - 轮询多画面消息字符串
55
+ * @param { string } customizedLayout - 会控上报的多画面消息字符串,包含统一多画面/轮询多画面、AVC、SVC等布局模式
34
56
  */
35
57
  handleCustomizedLayout(customizedLayout: string): void;
36
58
  /**
37
- * 接收/处理会控轮询多画面消息,更新缓存数据
59
+ * 停止多画面布局
60
+ */
61
+ stopMultiViewLayout(): void;
62
+ /**
63
+ * 处理会控多画面-AVC布局消息
38
64
  *
39
- * @param { ICustomizedLayout } params - 轮询多画面数据
65
+ * @param { XYMultiViewLayout } params - 多画面数据
40
66
  */
41
- handlePollingMessage(params: ICustomizedLayout): void;
67
+ private handleAVCLayoutMessage;
42
68
  /**
43
- * 执行轮询多画面操作:启动/暂停
69
+ * 处理会控轮询多画面-SVC布局消息
70
+ *
71
+ * @param { XYMultiViewLayout } params - 多画面数据
44
72
  */
45
- operatePollingLayout(): void;
73
+ private handlePollingLayoutMessage;
74
+ /**
75
+ * 开始轮询多画面
76
+ *
77
+ * @param { XYMultiViewLayout } params - 轮询多画面数据
78
+ */
79
+ startPollingLayout(params: XYMultiViewLayout): void;
80
+ /**
81
+ * 转换多画面列表类型为自动模式
82
+ *
83
+ * @param { CustomizedItem[] } detail - 多画面列表
84
+ * @param { boolean } auto - 是否是自动分配模式
85
+ * @returns { CustomizedItem[] } - 转换后的多画面列表
86
+ */
87
+ private convertDetailListToAutoType;
88
+ /**
89
+ * 获取当前轮询布局模式
90
+ *
91
+ * @returns { TemplateMode } - 布局模式
92
+ */
93
+ getTemplateMode(): TemplateMode;
94
+ /**
95
+ * 多画面布局-执行多画面操作:启动/暂停
96
+ */
97
+ operateMultiViewLayout(): void;
98
+ /**
99
+ * 处理多画面AVC/轮询AVC模式启动轮询多画面操作
100
+ *
101
+ * 1、生成基础的请流LayoutMap数据
102
+ * 2、请流布局
103
+ */
104
+ private handleStartAVCLayout;
105
+ /**
106
+ * 创建多画面AVC布局
107
+ */
108
+ private createAVCLayout;
46
109
  /**
47
110
  * 启动轮询多画面
48
111
  */
@@ -58,7 +121,7 @@ export default class Polling {
58
121
  /**
59
122
  * 判断轮询多画面配置是否变动
60
123
  *
61
- * @param { ICustomizedLayout } params - 轮询多画面配置参数
124
+ * @param { XYMultiViewLayout } params - 轮询多画面配置参数
62
125
  * @returns { boolean } - 是否变动
63
126
  */
64
127
  private checkPollingConfigChange;
@@ -79,13 +142,120 @@ export default class Polling {
79
142
  */
80
143
  private createPollingLayout;
81
144
  /**
82
- * 设置轮询多画面项模版数据
145
+ * 更新轮询多画面布局
83
146
  *
84
- * @param { ITemplateObj[] | undefined } tempList - 模版List数据
85
- * @param { PollingLayout } layout - LayoutMap数据结构
86
- * @param { number } i - 索引位
147
+ * 2025/07/25需求实现梳理的规则:
148
+ * 1、如果开启了优先显示语音激励开关,并且没有设置语音激励窗口
149
+ * - 1.1 如果是对称布局
150
+ * - 1.1.1 如果存在AS,且AS不存在画面中,则将AS显示到左上角第一个窗口
151
+ * - 1.1.2 如果存在AS,且AS在当前画面其他窗口,无需移动,原AS窗口需要标记篮框
152
+ * - 1.1.3 如果没有可用AS,则按照原窗口规则显示,无需处理
153
+ * - 1.2 如果是非对称布局
154
+ * - 1.2.1 如果当前列表存在AS,且不是大画面,则将AS和大画面互换(注意大画面和原AS位置是否存在可用值)
155
+ * - 1.2.2 如果当前列表不存在AS,且存在可用AS,则使用AS替换大画面位置(需要判断大画面位置是否存在可用值)
156
+ * - 1.2.3 如果没有可用AS,则显示原指定窗口画面,无需处理
157
+ * 2、如果开启了优先显示语音激励开关,设置了语音激励窗口
158
+ * - 无需处理
159
+ * 3、如果没有开启优先显示语音激励开关,则不做处理
160
+ * - 无需处理
161
+ *
162
+ * @param { ILayout[] } pollingLayout - 轮询多画面布局
163
+ * @returns { ILayout[] } - 轮询多画面布局
164
+ */
165
+ private updatePollingLayout;
166
+ /**
167
+ * 重置上一轮中轮询多画面布局中AS的状态,避免AS状态错乱
168
+ */
169
+ private resetPollingLayoutActiveSpeakerState;
170
+ /**
171
+ * 设置语音激励布局项到指定位置
172
+ *
173
+ * @param { ILayout[] } pollingLayout - 轮询多画面布局
174
+ * @param { BasePollingItem } speakerItem - 语音激励项数据
175
+ * @param { number } targetIndex - 目标位置索引
176
+ */
177
+ private setSpeakerLayoutItem;
178
+ /**
179
+ * 更新对称布局
180
+ * - 1.1 对称布局
181
+ * - 1.1.1 如果存在AS,且AS不存在画面中,则将AS显示到左上角第一个窗口
182
+ * - 1.1.2 如果存在AS,且AS在当前画面其他窗口,无需移动,原AS窗口需要标记篮框
183
+ * - 1.1.3 如果没有可用AS,则按照原窗口规则显示,无需处理
184
+ *
185
+ * @param { ILayout[] } pollingLayout - 轮询多画面布局
186
+ * @returns { ILayout[] } - 轮询多画面布局
187
+ */
188
+ private updateSymmetricLayout;
189
+ /**
190
+ * 设置布局项为语音激励状态
191
+ *
192
+ * @param { ILayout } layoutItem - 布局项
193
+ */
194
+ private setLayoutItemActiveSpeaker;
195
+ /**
196
+ * 更新非对称布局
197
+ * - 1.2 如果是非对称布局
198
+ * - 1.2.1 如果当前列表存在AS,且不是大画面,则将AS和大画面互换(注意大画面和原AS位置是否存在可用值)
199
+ * - 1.2.2 如果当前列表不存在AS,且存在可用AS,则使用AS替换大画面位置(需要判断大画面位置是否存在可用值)
200
+ * - 1.2.3 如果没有可用AS,则显示原指定窗口画面,无需处理
201
+ *
202
+ * @param { ILayout[] } pollingLayout - 轮询多画面布局
203
+ * @returns { ILayout[] } - 轮询多画面布局
204
+ */
205
+ private updateAsymmetricLayout;
206
+ /**
207
+ * 交换两个布局项的位置
208
+ *
209
+ * @param { ILayout[] } pollingLayout - 轮询多画面布局
210
+ * @param { number } indexA - 位置A
211
+ * @param { number } indexB - 位置B
87
212
  */
88
- private setPollingLayoutTemplate;
213
+ private swapLayoutItems;
214
+ /**
215
+ * 创建轮询多画面基础布局
216
+ *
217
+ * @param { ITemplateObj[] } tempList - 模版List数据
218
+ * @param { number } index - 索引位
219
+ * @returns { ILayout } - 基础布局数据
220
+ */
221
+ private createBaseTemplateLayout;
222
+ /**
223
+ * 创建轮询多画面布局项
224
+ *
225
+ * @param { CustomizedItem } item - 布局项数据
226
+ * @param { number } index - 索引位
227
+ * @param { number } autoPollingIndex - 自动轮询索引位
228
+ * @returns { XYPollingLayoutItemData } - 布局项数据
229
+ */
230
+ private createLayoutItemByType;
231
+ /**
232
+ * 创建语音激励布局项
233
+ *
234
+ * @param { number } index - 索引位
235
+ * @returns { XYPollingLayoutItemData } - 布局项数据
236
+ */
237
+ private createSpeakerLayoutItem;
238
+ /**
239
+ * 创建手动指定轮询布局项
240
+ *
241
+ * @param { number } index - 索引位
242
+ * @param { CustomizedItem } item - 布局项数据
243
+ * @returns { XYPollingLayoutItemData } - 布局项数据
244
+ */
245
+ private createSpecifiedLayoutItem;
246
+ /**
247
+ * 创建自动轮询布局项
248
+ *
249
+ * @param { number } index - 索引位
250
+ * @param { number } autoPollingIndex - 自动轮询索引位
251
+ * @returns { XYPollingLayoutItemData } - 布局项数据
252
+ */
253
+ private createAutoLayoutItem;
254
+ /**
255
+ * 生成自定义Layout Polling ID
256
+ * 目的是画面重复渲染时,支持生成唯一的ID字段
257
+ */
258
+ private generateCustomId;
89
259
  /**
90
260
  * 获取当前全量roster信息Map
91
261
  *
@@ -100,6 +270,10 @@ export default class Polling {
100
270
  * @param { string } customId - 自定义Id
101
271
  */
102
272
  private setPollingLayoutItem;
273
+ /**
274
+ * 创建多画面AVC请流列表
275
+ */
276
+ private createAVCRequestNewLayout;
103
277
  /**
104
278
  * 根据pollingLayout创建请流列表
105
279
  */
@@ -140,9 +314,15 @@ export default class Polling {
140
314
  */
141
315
  private calculateAutoPollingPageInfo;
142
316
  /**
143
- * 创建Active Speaker数据
317
+ * 计算Active Speaker数据(窗口指定语音激励模式)
318
+ * 窗口指定语音激励时:AS获取: 媒体一路AS > roster排序(排除Local,content) > null
319
+ */
320
+ private calculateCommonActiveSpeaker;
321
+ /**
322
+ * 获取Active Speaker数据(启用AS优先开关模式)
323
+ * 开启优先显示语音激励开关时:获取可用AS的规则: 媒体一路AS + audio unmute > Local audio unmute > null(原窗口设定规则)
144
324
  */
145
- private calculateSpeaker;
325
+ private calculateUnmuteActiveSpeaker;
146
326
  /**
147
327
  * 计算指定的DI是否包含在指定循环列表中
148
328
  *
@@ -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
  * 资源销毁
@@ -36,6 +36,10 @@ export declare class XYMediaManager implements XYBaseModule {
36
36
  * 监听Peer模块上Track轨道数据
37
37
  */
38
38
  handleTrackEvent(e: RTCTrackEvent): void;
39
+ /**
40
+ * 获取当前语音激励的Roster
41
+ */
42
+ getActiveSpeakerRoster(): IRoster | null;
39
43
  /**
40
44
  * 合并Track轨道数据
41
45
  *