@xylink/xy-rtc-sdk 4.0.8 → 4.0.10
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/action/api.d.ts +17 -1
- package/action/auth.d.ts +13 -2
- package/action/control.d.ts +15 -1
- package/action/index.d.ts +1 -0
- package/action/meeting.d.ts +5 -3
- package/enum/index.d.ts +21 -1
- package/enum/meeting.d.ts +36 -0
- package/feature/aiCopilot/index.d.ts +51 -0
- package/feature/im/index.d.ts +4 -1
- package/feature/im/index.type.d.ts +2 -1
- package/feature/index.d.ts +9 -0
- package/feature/meetingControl/index.d.ts +29 -0
- package/feature/transcription/index.d.ts +89 -0
- package/feature/transcription/index.type.d.ts +81 -0
- package/feature/translation/index.d.ts +23 -3
- package/index.d.ts +7 -1
- package/interface/event.type.d.ts +7 -0
- package/main/ability/index.d.ts +1 -1
- package/main/auth/index.type.d.ts +30 -2
- package/main/client/index.d.ts +68 -5
- package/main/meeting/control.d.ts +25 -1
- package/main/meeting/index.d.ts +21 -2
- package/main/meeting/index.type.d.ts +31 -3
- package/main/peer/index.d.ts +18 -8
- package/main/peer/sdp.d.ts +63 -0
- package/main/quality/index.d.ts +26 -0
- package/main/server/index.d.ts +19 -0
- package/main/server/index.type.d.ts +4 -0
- package/main/track/contentTrack.d.ts +4 -0
- package/package.json +3 -4
- package/tools/config.d.ts +25 -0
- package/type/ability.d.ts +5 -1
- package/type/client.d.ts +31 -1
- package/type/index.d.ts +1 -0
- package/type/meeting.d.ts +66 -1
- package/type/quality.d.ts +13 -1
- package/type/stream.d.ts +2 -0
- package/type/theme.d.ts +15 -0
- package/xyrtc.js +6075 -5384
|
@@ -24,12 +24,14 @@ export interface CheckCaptchaImageParams {
|
|
|
24
24
|
* @property { boolean } checkPasswordExpirationTime - 检查密码过期时间
|
|
25
25
|
* @property { boolean } checkPasswordEnhance - 不检查密码强度
|
|
26
26
|
* @property { boolean } checkTwoFactors - 检查双因子登录
|
|
27
|
+
* @property { boolean } validatePasswordPolicy - 是否校验密码安全策略
|
|
27
28
|
*/
|
|
28
29
|
export interface LoginOtherParams {
|
|
29
30
|
enhancePassword?: boolean;
|
|
30
31
|
checkPasswordExpirationTime?: boolean;
|
|
31
32
|
checkPasswordEnhance?: boolean;
|
|
32
33
|
checkTwoFactors?: boolean;
|
|
34
|
+
validatePasswordPolicy?: boolean;
|
|
33
35
|
extId?: string;
|
|
34
36
|
extUserId?: string;
|
|
35
37
|
}
|
|
@@ -60,15 +62,39 @@ export declare enum XYLoginState {
|
|
|
60
62
|
*/
|
|
61
63
|
TokenRefresh = "TokenRefresh"
|
|
62
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* 密码组成
|
|
67
|
+
*
|
|
68
|
+
* @property { boolean } digit - 是否包含数字
|
|
69
|
+
* @property { boolean } lowerCase - 是否包含小写字母
|
|
70
|
+
* @property { boolean } specialChar - 是否包含特殊字符
|
|
71
|
+
* @property { boolean } upperCase - 是否包含大写字母
|
|
72
|
+
*/
|
|
73
|
+
export interface XYPasswordComposition {
|
|
74
|
+
digit: boolean;
|
|
75
|
+
lowerCase: boolean;
|
|
76
|
+
specialChar: boolean;
|
|
77
|
+
upperCase: boolean;
|
|
78
|
+
}
|
|
63
79
|
/**
|
|
64
80
|
* 小鱼账号配置
|
|
65
81
|
*
|
|
66
82
|
* @property { boolean } enhancePassword - 不校验密码安全策略
|
|
67
|
-
* @property {
|
|
83
|
+
* @property { string } passwordLength - 密码长度(格式: 8-16)
|
|
84
|
+
* @property { XYPasswordComposition } passwordComposition - 密码组成
|
|
85
|
+
* @property { number } passwordMaxLength - 密码最大长度
|
|
86
|
+
* @property { number } passwordMinLength - 密码最小长度
|
|
87
|
+
* @property { string } passwordValidationRegex - 密码验证正则表达式
|
|
88
|
+
* @property { string } enhancedPasswordRegex - 增强密码验证正则表达式, 兼容登录密码规则
|
|
68
89
|
*/
|
|
69
90
|
export interface XYAccountConfig {
|
|
70
91
|
enhancePassword: boolean;
|
|
71
|
-
passwordLength:
|
|
92
|
+
passwordLength: string;
|
|
93
|
+
passwordComposition?: XYPasswordComposition;
|
|
94
|
+
passwordMaxLength?: number;
|
|
95
|
+
passwordMinLength?: number;
|
|
96
|
+
passwordValidationRegex?: string;
|
|
97
|
+
enhancedPasswordRegex?: string;
|
|
72
98
|
}
|
|
73
99
|
/**
|
|
74
100
|
* 重置密码参数
|
|
@@ -77,10 +103,12 @@ export interface XYAccountConfig {
|
|
|
77
103
|
* @property { string } password - 旧密码, 如果是验证码登录,此值可不传
|
|
78
104
|
* @property { string } newPassword - 新密码
|
|
79
105
|
* @property { string } verificationCode - 验证码, 如果是账号密码登录,此值可不传
|
|
106
|
+
* @property { boolean } enhancePassword - 是否增强密码
|
|
80
107
|
*/
|
|
81
108
|
export interface XYResetPasswordParams {
|
|
82
109
|
account: string;
|
|
83
110
|
password?: string;
|
|
84
111
|
newPassword: string;
|
|
85
112
|
verificationCode?: string;
|
|
113
|
+
enhancePassword?: boolean;
|
|
86
114
|
}
|
package/main/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IClientConfig, ICall, IMakeCall, IInvite, IRoster, ILoginExtAccount, IVideoAudioType, IMode, IReqInfo, TCommand, ContentMode, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl, IVideoControlResult, ICustomMessageConfig, OperateType, PushType, LayoutMode, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, IReturnResult, InviteInfo, LayoutOrientationType, AnalyserConfig, IFeatureConfigValue, IFeatureConfigKey, MEETING_DIRECTION, LocalViewParams, AbilityResult, IExportUserInfo, IVideoProfile, ReconnectEntry, LoginTokenInfo, LayoutConfig, IStateParams, IScreenInfo, IInternals, XYClientIF, IGetConferenceParams, XYCheckNumberParams, LoginThirdAuthTokenParams, LoginVerifyCodeParams, XYWebRxAudioStatus, ClientInfoConfig } from '../../type/index';
|
|
1
|
+
import { IClientConfig, ICall, IMakeCall, IInvite, IRoster, ILoginExtAccount, IVideoAudioType, IMode, IReqInfo, TCommand, ContentMode, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl, IVideoControlResult, ICustomMessageConfig, OperateType, PushType, LayoutMode, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, IReturnResult, InviteInfo, LayoutOrientationType, AnalyserConfig, IFeatureConfigValue, IFeatureConfigKey, MEETING_DIRECTION, LocalViewParams, AbilityResult, IExportUserInfo, IVideoProfile, ReconnectEntry, LoginTokenInfo, LayoutConfig, IStateParams, IScreenInfo, IInternals, XYClientIF, IGetConferenceParams, XYCheckNumberParams, LoginThirdAuthTokenParams, LoginVerifyCodeParams, XYWebRxAudioStatus, ClientInfoConfig, XYTranscriptionApprovalParams, LayoutAvatar, TShowLanguage } from '../../type/index';
|
|
2
2
|
import { SnapshotParams, XYDevicePressure } from '@xylink/xy-toolkit';
|
|
3
3
|
import { default as Peer } from '../peer/index';
|
|
4
4
|
import { default as Stream } from '../stream';
|
|
@@ -25,10 +25,14 @@ import { XYEDU } from '../../feature/edu';
|
|
|
25
25
|
import { XYElectron } from '../../feature/index';
|
|
26
26
|
import { default as RosterManager } from '../roster';
|
|
27
27
|
import { XYIMClient } from '../../feature/im';
|
|
28
|
+
import { XYTranscriptionClient } from '../../feature/transcription';
|
|
29
|
+
import { XYAiCopilotClient } from '../../feature/aiCopilot';
|
|
28
30
|
import { XYMemberDepartment } from '../../feature/query/index.type';
|
|
29
31
|
import { CheckCaptchaImageParams, LoginOtherParams, XYResetPasswordParams } from '../auth/index.type';
|
|
30
32
|
import { XY_WHITEBOARD_DATA } from '../../feature/artboard/index.type';
|
|
31
33
|
import { XYVepManager } from '../../feature/vep';
|
|
34
|
+
import { default as XYTranslationManager } from '../../feature/translation';
|
|
35
|
+
import { XYMeetingControlClient } from '../../feature/meetingControl';
|
|
32
36
|
import { XYReconnectionManager } from '../signal/reconnection';
|
|
33
37
|
export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
34
38
|
logger: Logger;
|
|
@@ -37,6 +41,9 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
37
41
|
private rosterManager;
|
|
38
42
|
private serverManager;
|
|
39
43
|
private imClient;
|
|
44
|
+
private transcriptionClient;
|
|
45
|
+
private aiCopilotClient;
|
|
46
|
+
private meetingControlClient;
|
|
40
47
|
private auth;
|
|
41
48
|
private stream;
|
|
42
49
|
protected stateManager: XYRTCClientState;
|
|
@@ -112,6 +119,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
112
119
|
getImClient(): XYIMClient | null;
|
|
113
120
|
getVepManager(): XYVepManager | undefined;
|
|
114
121
|
getElectron(): XYElectron | null;
|
|
122
|
+
getTranslationManager(): XYTranslationManager;
|
|
115
123
|
/**
|
|
116
124
|
* 获取服务器地址
|
|
117
125
|
*
|
|
@@ -159,6 +167,13 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
159
167
|
* 获取Layout头像配置类型
|
|
160
168
|
*/
|
|
161
169
|
getLayoutAvatarType(): import('../../type/index').LayoutAvatarType;
|
|
170
|
+
/**
|
|
171
|
+
* 参会者头像(与视频区 layout.avatar 一致,需 enableLayoutAvatar 与企业配置)。
|
|
172
|
+
* 自定义图片优先;否则按 layoutAvatarType 返回名称或人物头像。
|
|
173
|
+
*
|
|
174
|
+
* @returns { LayoutAvatar | null } type 为名称/人物头像,value 为展示文字或图片地址
|
|
175
|
+
*/
|
|
176
|
+
getParticipantAvatar(roster: IRoster | null): LayoutAvatar | null;
|
|
162
177
|
/**
|
|
163
178
|
* 企业媒体相关配置信息
|
|
164
179
|
*
|
|
@@ -440,12 +455,17 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
440
455
|
* @property { boolean } config.enableMobileNotAuth - 是否启用移动端无授权入会,默认不启用,设置为false;此配置已经废弃,移动端已支持动态授权功能;
|
|
441
456
|
* @property { boolean } config.enableWatermarkContent - 是否启用获取content水印内容, 默认启用, 设置为true
|
|
442
457
|
* @property { boolean } config.enableHideLocalView - 是否启用隐藏本地画面模式,默认不启用,设置为false
|
|
458
|
+
* @property { boolean } config.enableAudioPCM - 是否启用音频PCM,默认不启用,设置为false
|
|
459
|
+
* @property { boolean } config.enableReCall - 是否支持重新呼叫, 默认启用, 设置为true
|
|
460
|
+
* @property { boolean } config.enableMoreStreams - 是否支持更多画面流,默认不启用,设置为false,后续仅配置moreStreamsMaxCount即可;如配置为true,则自动转为18路画面流
|
|
461
|
+
* @property { XYMoreStreamsMaxCount } config.moreStreamsMaxCount - 配置更多画面流的最大数量,默认是9,支持9/18/32路画面流,如配置为其他枚举/数值,则自动转为9画面
|
|
462
|
+
* @property { boolean } config.enableMultiLayoutPolling - 是否响应会控多画面/轮询广播与自定义轮询布局,默认 true;为 false 时忽略轮询相关布局
|
|
443
463
|
* @returns { IReturnResult }
|
|
444
464
|
*/
|
|
445
465
|
setFeatureConfig(config: IFeatureConfig): Promise<IReturnResult>;
|
|
446
466
|
/**
|
|
447
467
|
* 动态切换功能开关
|
|
448
|
-
* 目前支持enableAutoResizeLayout
|
|
468
|
+
* 目前支持 enableAutoResizeLayout、enableLowResolution、enableMultiLayoutPolling 等布尔型开关
|
|
449
469
|
*
|
|
450
470
|
* @param { IFeatureConfigKey } key - 功能的Key值
|
|
451
471
|
* @param { IFeatureConfigValue<IFeatureConfigKey> } value - 设置的值
|
|
@@ -457,6 +477,14 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
457
477
|
* @param { IFeatureConfigKey } key - Feature Config Key
|
|
458
478
|
*/
|
|
459
479
|
private processFeatureConfig;
|
|
480
|
+
/**
|
|
481
|
+
* 合并更多画面流配置
|
|
482
|
+
* 规则:
|
|
483
|
+
* 1、如果配置了enableMoreStreams,则将moreStreamsMaxCount配置为EIGHTEEN 18路画面流
|
|
484
|
+
* 2、如果配置了moreStreamsMaxCount,且符合配置规则,则更新对应moreStreamsMaxCount配置;
|
|
485
|
+
* 3、如果配置了moreStreamsMaxCount,且不符合配置规则,则重置moreStreamsMaxCount配置为NINE;
|
|
486
|
+
*/
|
|
487
|
+
private mergeMoreStreamsConfig;
|
|
460
488
|
/**
|
|
461
489
|
* 设置上下行视频的分辨率和帧率
|
|
462
490
|
*
|
|
@@ -734,6 +762,22 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
734
762
|
* @returns { Promise<IReturnResult | null> }
|
|
735
763
|
*/
|
|
736
764
|
sendVideoControlResult(type: 'muteVideo' | 'unMuteVideo', data: IVideoControlResult): Promise<IReturnResult>;
|
|
765
|
+
/**
|
|
766
|
+
* 参会者发送文字转写申请
|
|
767
|
+
*
|
|
768
|
+
* 会议室设置为"仅允许主持人开启"时,普通参会者通过此方法发起申请。
|
|
769
|
+
* 当本场会议累计被拒绝次数达到 3 次时,SDK 直接 reject 错误码 `XYSDK:TRANSCRIPTION_REJECTED_BLOCKED`,不调用后端接口。
|
|
770
|
+
*
|
|
771
|
+
* @returns { Promise<IReturnResult> }
|
|
772
|
+
*/
|
|
773
|
+
applyTranscription(): Promise<IReturnResult>;
|
|
774
|
+
/**
|
|
775
|
+
* 主持人审批文字转写申请
|
|
776
|
+
*
|
|
777
|
+
* @param { XYTranscriptionApprovalParams } params - 审批参数(action: approve | reject;stopAccepting: 是否不再接受新请求)
|
|
778
|
+
* @returns { Promise<IReturnResult> }
|
|
779
|
+
*/
|
|
780
|
+
approveTranscription(params: XYTranscriptionApprovalParams): Promise<IReturnResult>;
|
|
737
781
|
/**
|
|
738
782
|
* 处理呼叫异常消息
|
|
739
783
|
*
|
|
@@ -1005,7 +1049,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
1005
1049
|
* @param { object? } extParams - 可选,控制额外的参数
|
|
1006
1050
|
* @returns { Promise<boolean> } - 是否请求成功
|
|
1007
1051
|
*/
|
|
1008
|
-
requestNewLayout(reqList: any, maxViewCountPerPage: number, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
|
|
1052
|
+
requestNewLayout(reqList: any, maxViewCountPerPage: number | undefined, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
|
|
1009
1053
|
/**
|
|
1010
1054
|
* 自定义布局-自动轮询请求参会者的视频流
|
|
1011
1055
|
* 使用场景:教育平台调用全部画面数据
|
|
@@ -1130,7 +1174,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
1130
1174
|
/**
|
|
1131
1175
|
* 开启通话字幕
|
|
1132
1176
|
*/
|
|
1133
|
-
startTranslation(): Promise<IReturnResult>;
|
|
1177
|
+
startTranslation(showLanguage?: TShowLanguage): Promise<IReturnResult>;
|
|
1134
1178
|
/**
|
|
1135
1179
|
* 停止通话字幕
|
|
1136
1180
|
*/
|
|
@@ -1143,7 +1187,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
1143
1187
|
* @param { TLocalLanguage } language - 设置的语言
|
|
1144
1188
|
* @returns { Promise<IReturnResult> } - 返回结果
|
|
1145
1189
|
*/
|
|
1146
|
-
setTranslationLanguage(language: TLocalLanguage): Promise<IReturnResult>;
|
|
1190
|
+
setTranslationLanguage(language: TLocalLanguage, showLanguage?: TShowLanguage): Promise<IReturnResult>;
|
|
1147
1191
|
/**
|
|
1148
1192
|
* 开启云端录制
|
|
1149
1193
|
* 使用场景:需要云端录制功能,录制整个会议的画面和声音数据
|
|
@@ -1242,6 +1286,20 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
1242
1286
|
* 创建IM聊天模块
|
|
1243
1287
|
*/
|
|
1244
1288
|
createIMWidget(): XYIMClient;
|
|
1289
|
+
/**
|
|
1290
|
+
* 创建会中文字转写 iframe 模块
|
|
1291
|
+
*/
|
|
1292
|
+
createTranscriptionWidget(): XYTranscriptionClient;
|
|
1293
|
+
getTranscriptionClient(): XYTranscriptionClient | null;
|
|
1294
|
+
/**
|
|
1295
|
+
* 创建会中 AI 助手 iframe 模块
|
|
1296
|
+
*/
|
|
1297
|
+
createAiCopilotWidget(): XYAiCopilotClient;
|
|
1298
|
+
/**
|
|
1299
|
+
* 创建会控 iframe 模块
|
|
1300
|
+
*/
|
|
1301
|
+
createMeetingControlWidget(): XYMeetingControlClient;
|
|
1302
|
+
getAiCopilotClient(): XYAiCopilotClient | null;
|
|
1245
1303
|
/**
|
|
1246
1304
|
* 校验入会名称
|
|
1247
1305
|
*
|
|
@@ -1265,6 +1323,11 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
1265
1323
|
* @returns { Promise<XYUicustomization> } - 权限信息
|
|
1266
1324
|
*/
|
|
1267
1325
|
getUicustomization(): Promise<import('../../type/index').XYUicustomization>;
|
|
1326
|
+
/**
|
|
1327
|
+
* 获取转写权限信息
|
|
1328
|
+
* @returns { Promise<void> } - 转写权限信息
|
|
1329
|
+
*/
|
|
1330
|
+
getTranscriptionPermissionInfo(): Promise<void>;
|
|
1268
1331
|
/**
|
|
1269
1332
|
* 开始白板分享
|
|
1270
1333
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as XYRTCClient } from '../client';
|
|
2
|
-
import { OriginalNotification, OriginalRealTimeNotification, IReturnResult, ISubTitle, IEPMessage, IWaitingState, IMeetingControl, IRecordStatusNotification, IRecordingStateChanged, XYBaseModule } from '../../type/index';
|
|
2
|
+
import { OriginalNotification, OriginalRealTimeNotification, IReturnResult, ISubTitle, IEPMessage, IWaitingState, IMeetingControl, IRecordStatusNotification, IRecordingStateChanged, XYBaseModule, XYTranscriptionPermission, XYTranscriptionApprovalParams } from '../../type/index';
|
|
3
3
|
export declare class XYMeetingControl implements XYBaseModule {
|
|
4
4
|
private client;
|
|
5
5
|
private logger;
|
|
@@ -12,10 +12,34 @@ export declare class XYMeetingControl implements XYBaseModule {
|
|
|
12
12
|
private signInServerAPI;
|
|
13
13
|
private signInServerPromise;
|
|
14
14
|
private interactiveToolInfo;
|
|
15
|
+
private transcriptionPermission;
|
|
16
|
+
private parsedTranscriptionPermission;
|
|
15
17
|
constructor(client: XYRTCClient);
|
|
16
18
|
destroy(): void;
|
|
17
19
|
getOnHold(): boolean;
|
|
18
20
|
getHandStatus(): boolean;
|
|
21
|
+
getTranscriptionPermission(): string;
|
|
22
|
+
/**
|
|
23
|
+
* 获取最近一次解析后的转写权限对象(含申请状态字段)
|
|
24
|
+
*/
|
|
25
|
+
getParsedTranscriptionPermission(): XYTranscriptionPermission | null;
|
|
26
|
+
/**
|
|
27
|
+
* 参会者发送文字转写申请
|
|
28
|
+
*
|
|
29
|
+
* @returns { Promise<IReturnResult> }
|
|
30
|
+
*/
|
|
31
|
+
applyTranscription(): Promise<IReturnResult>;
|
|
32
|
+
/**
|
|
33
|
+
* 主持人审批文字转写申请
|
|
34
|
+
*
|
|
35
|
+
* @param { XYTranscriptionApprovalParams } params - 审批参数
|
|
36
|
+
* @returns { Promise<IReturnResult> }
|
|
37
|
+
*/
|
|
38
|
+
approveTranscription(params: XYTranscriptionApprovalParams): Promise<IReturnResult>;
|
|
39
|
+
/**
|
|
40
|
+
* 主持人再入会后主动拉取当前转写权限与待处理申请状态
|
|
41
|
+
*/
|
|
42
|
+
getTranscriptionPermissionInfo(): Promise<void>;
|
|
19
43
|
/**
|
|
20
44
|
* 设置本地是否在等候室
|
|
21
45
|
*
|
package/main/meeting/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IConferenceInfo, IRecordPermission, IExportUserInfo, ILayout, IMediaConfig, IReqInfo, IEnterpriseConfig, LayoutAvatarType, TLayoutMap, InviteInfo, MEETING_DIRECTION, IVideoProfile, IMeetingControl, FocusViewAction } from '../../type/index';
|
|
1
|
+
import { IConferenceInfo, IRecordPermission, IExportUserInfo, ILayout, IRoster, IMediaConfig, IReqInfo, IEnterpriseConfig, LayoutAvatar, LayoutAvatarType, TLayoutMap, InviteInfo, MEETING_DIRECTION, IVideoProfile, IMeetingControl, FocusViewAction } from '../../type/index';
|
|
2
2
|
import { default as Client } from '../client';
|
|
3
|
-
import { XYEnterpriseInfo, XYUicustomization } from './index.type';
|
|
3
|
+
import { XYEnterpriseInfo, XYTranscriptionStatus, XYUicustomization } from './index.type';
|
|
4
4
|
declare class Meeting {
|
|
5
5
|
private client;
|
|
6
6
|
private logger;
|
|
@@ -9,11 +9,14 @@ declare class Meeting {
|
|
|
9
9
|
private recordPermission;
|
|
10
10
|
private cloudRoomInfo;
|
|
11
11
|
private layoutImageAvatarMap;
|
|
12
|
+
/** 同一 roster.key 头像拉取在途 Promise,避免 layout 与 getParticipantAvatar 重复请求 */
|
|
13
|
+
private layoutAvatarFetchPromises;
|
|
12
14
|
private mediaConfig;
|
|
13
15
|
private enterpriseConfig;
|
|
14
16
|
private userInfo;
|
|
15
17
|
private meetingControlInfo;
|
|
16
18
|
private mmsSubtitle;
|
|
19
|
+
private transcriptionStatus;
|
|
17
20
|
constructor(client: Client);
|
|
18
21
|
destroy(): void;
|
|
19
22
|
/**
|
|
@@ -25,10 +28,18 @@ declare class Meeting {
|
|
|
25
28
|
url: string;
|
|
26
29
|
isCustom: boolean;
|
|
27
30
|
}>;
|
|
31
|
+
/**
|
|
32
|
+
* 参会者列表等场景使用的头像(与 layout.avatar 展示规则一致:setLayoutAvatar 覆盖 + getLayoutAvatar 基准)。
|
|
33
|
+
*
|
|
34
|
+
* @param { IRoster | null } roster - 花名册项
|
|
35
|
+
* @returns { LayoutAvatar | null } 头像类型与展示值,未启用头像配置时为 null
|
|
36
|
+
*/
|
|
37
|
+
getParticipantAvatar(roster: IRoster | null): LayoutAvatar | null;
|
|
28
38
|
getEnterpriseMediaConfig(): IMediaConfig;
|
|
29
39
|
getUserInfo(): IExportUserInfo | null;
|
|
30
40
|
getConferenceInfo(): IConferenceInfo;
|
|
31
41
|
getEnterpriseConfig(): IEnterpriseConfig;
|
|
42
|
+
getTranscriptionStatus(): XYTranscriptionStatus | null;
|
|
32
43
|
getLayoutAvatarType(): LayoutAvatarType;
|
|
33
44
|
/**
|
|
34
45
|
* 获取会控消息
|
|
@@ -115,6 +126,14 @@ declare class Meeting {
|
|
|
115
126
|
* @param { TLayoutMap } layoutListMap
|
|
116
127
|
*/
|
|
117
128
|
handleLayoutAvatar(layoutListMap: TLayoutMap): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* 按 roster 拉取头像并写入 `layoutImageAvatarMap`;map 已有 URL 或同 key 已在拉取时不再请求接口。
|
|
131
|
+
*
|
|
132
|
+
* @param { IRoster } roster - 花名册或 layout 携带的 roster
|
|
133
|
+
* @returns { Promise<void> } 拉取流程结束(含跳过)
|
|
134
|
+
*/
|
|
135
|
+
private scheduleLayoutImageAvatarFetch;
|
|
136
|
+
private runLayoutImageAvatarFetch;
|
|
118
137
|
/**
|
|
119
138
|
* 获取vcNumber真实的会议室信息
|
|
120
139
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { XYTranscriptionAuthority } from '../../enum/meeting';
|
|
1
2
|
import { XYCommonState } from '../../type/base';
|
|
2
3
|
/**
|
|
3
4
|
* 企业配置相关信息
|
|
@@ -38,6 +39,9 @@ export interface XYSensitiveWords {
|
|
|
38
39
|
* @since 4.0.6
|
|
39
40
|
* @property { boolean } professionalMC - 是否显示会控专业模式
|
|
40
41
|
* @property { boolean } manageSubtitle - 是否开启字幕管理
|
|
42
|
+
* @since 4.0.10
|
|
43
|
+
* @property { boolean } aiAssistant - 是否开启AI助手
|
|
44
|
+
* @property { XYTranscriptionAuthority } transcriptionAuthority - 转写控制权限
|
|
41
45
|
*/
|
|
42
46
|
export interface XYConferencePropertiesMessage {
|
|
43
47
|
enableContentLive?: boolean;
|
|
@@ -46,10 +50,36 @@ export interface XYConferencePropertiesMessage {
|
|
|
46
50
|
confRoomOwnerList?: string;
|
|
47
51
|
professionalMC?: boolean;
|
|
48
52
|
manageSubtitle?: boolean;
|
|
53
|
+
aiAssistant?: boolean;
|
|
54
|
+
transcriptionAuthority?: XYTranscriptionAuthority;
|
|
49
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* 通话字幕、转写类型
|
|
58
|
+
*
|
|
59
|
+
* @param TRANSCRIPTION - 转写
|
|
60
|
+
* @param SUBTITLE - 字幕
|
|
61
|
+
*/
|
|
50
62
|
export declare enum XYTranscriptionType {
|
|
63
|
+
TRANSCRIPTION = 1,
|
|
51
64
|
SUBTITLE = 2
|
|
52
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* 在线转写状态
|
|
68
|
+
*
|
|
69
|
+
* @property { XYCommonState } onlineTranscriptionStatus - 在线转写开关/进行状态
|
|
70
|
+
* @property { string } dn - 开启转写的参会者名称
|
|
71
|
+
* @property { number } host - 开启转写的参会者是否是主持人
|
|
72
|
+
* @property { string } callUri - 开启转写的参会者callUri
|
|
73
|
+
*/
|
|
74
|
+
export interface XYOnlineTranscriptionStatus {
|
|
75
|
+
onlineTranscriptionStatus: XYCommonState;
|
|
76
|
+
dn: string;
|
|
77
|
+
host: number;
|
|
78
|
+
callUri?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface XYTranscriptionStatusBody extends XYOnlineTranscriptionStatus {
|
|
81
|
+
mmsSubtitle?: XYCommonState;
|
|
82
|
+
}
|
|
53
83
|
/**
|
|
54
84
|
* 通话字幕、转写状态变更事件
|
|
55
85
|
*
|
|
@@ -58,7 +88,5 @@ export declare enum XYTranscriptionType {
|
|
|
58
88
|
*/
|
|
59
89
|
export interface XYTranscriptionStatus {
|
|
60
90
|
type: XYTranscriptionType;
|
|
61
|
-
body:
|
|
62
|
-
mmsSubtitle: XYCommonState;
|
|
63
|
-
};
|
|
91
|
+
body: XYTranscriptionStatusBody;
|
|
64
92
|
}
|
package/main/peer/index.d.ts
CHANGED
|
@@ -32,6 +32,9 @@ export default class Peer extends State {
|
|
|
32
32
|
private detectTrackMsgTimer;
|
|
33
33
|
private candidateList;
|
|
34
34
|
private offerKey;
|
|
35
|
+
private lastRemoteCandidateId;
|
|
36
|
+
private candidateStableCount;
|
|
37
|
+
private isCandidateLocked;
|
|
35
38
|
constructor(client: Client, isRenew?: boolean);
|
|
36
39
|
/**
|
|
37
40
|
* 初始化质量统计WebWorker模块
|
|
@@ -73,9 +76,23 @@ export default class Peer extends State {
|
|
|
73
76
|
*/
|
|
74
77
|
private stopDetectTrackMsgTimer;
|
|
75
78
|
/**
|
|
76
|
-
*
|
|
79
|
+
* 从 getStats 报告中提取当前选中的候选对及其关联的本地/远端候选信息
|
|
80
|
+
*
|
|
81
|
+
* @param { RTCStatsReport } stats - 统计报告
|
|
82
|
+
*/
|
|
83
|
+
private pickSelectedPair;
|
|
84
|
+
/**
|
|
85
|
+
* 获取协商选中的候选地址对,执行稳定判定后投递给 Worker
|
|
86
|
+
*
|
|
87
|
+
* 稳定判定:连续 CANDIDATE_STABLE_THRESHOLD 次 remoteCandidateId 不变 → 锁定
|
|
88
|
+
* 锁定后:持续监控 remoteCandidateId,若底层切换则解锁重新判定
|
|
89
|
+
* ICE 异常:由 resetCandidateStable() 解锁
|
|
77
90
|
*/
|
|
78
91
|
private getCandidatePairs;
|
|
92
|
+
/**
|
|
93
|
+
* ICE 异常时重置候选对稳定判定状态和 Worker 缓存
|
|
94
|
+
*/
|
|
95
|
+
private resetCandidateStable;
|
|
79
96
|
/**
|
|
80
97
|
* 监听PeerConnection连接状态
|
|
81
98
|
*/
|
|
@@ -108,13 +125,6 @@ export default class Peer extends State {
|
|
|
108
125
|
* ice协商回调事件
|
|
109
126
|
*/
|
|
110
127
|
private onHandleNegotiationNeeded;
|
|
111
|
-
/**
|
|
112
|
-
* 修改SDP内容
|
|
113
|
-
*
|
|
114
|
-
* @param { string } sdp - offer sdp报文信息
|
|
115
|
-
* @returns { string } - 修改后的报文
|
|
116
|
-
*/
|
|
117
|
-
private appendExtmap;
|
|
118
128
|
/**
|
|
119
129
|
* 创建offer,并针对stream设置初始带宽
|
|
120
130
|
*
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Peer SDP 预处理
|
|
3
|
+
*
|
|
4
|
+
* 负责 Firefox 浏览器 Offer 阶段的 SDP 扩展补全。
|
|
5
|
+
* 旧版 Firefox 音频段可能缺少 abs-send-time / transport-wide-cc,需手动注入以适配媒体网关;
|
|
6
|
+
* 新版 Firefox(113+)已原生生成 extmap:7,须按 m= 段按 URI 去重后再补全,避免 duplicate extension id。
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Peer SDP 静态工具类
|
|
10
|
+
*
|
|
11
|
+
* 调用时机:Peer.createBaseOfferConnection() 在 createOffer 之后、setLocalDescription 之前
|
|
12
|
+
* 适用浏览器:仅 Firefox(Chrome/Edge 不走此逻辑)
|
|
13
|
+
*/
|
|
14
|
+
export declare class XYPeerSDP {
|
|
15
|
+
/** RTP 扩展 URI 常量 */
|
|
16
|
+
private static readonly EXT_URI;
|
|
17
|
+
/** 待注入的 extmap 行,id 固定为 4/7,与历史网关约定一致 */
|
|
18
|
+
private static readonly EXTMAP_LINE;
|
|
19
|
+
/** 匹配 mid 扩展行,作为缺失 extmap 的插入锚点 */
|
|
20
|
+
private static readonly MID_LINE_REGEX;
|
|
21
|
+
/**
|
|
22
|
+
* Firefox Offer SDP 补丁入口
|
|
23
|
+
*
|
|
24
|
+
* 将 SDP 按 m= 切分为多个 media section,逐段检查并仅补全缺失的 extmap 行。
|
|
25
|
+
*
|
|
26
|
+
* @param { string } sdp - createOffer 生成的原始 SDP 报文
|
|
27
|
+
* @returns { string } 补全后的 SDP,可直接用于 setLocalDescription
|
|
28
|
+
*/
|
|
29
|
+
static patchFirefoxOffer(sdp: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* 按 m= 行将 SDP 切分为 session 段与各 media 段
|
|
32
|
+
*
|
|
33
|
+
* @param { string } sdp - 完整 SDP
|
|
34
|
+
* @returns { string[] } 分段数组,首段为 session-level(v=/o=/s= 等),后续为 m=audio/video/...
|
|
35
|
+
*/
|
|
36
|
+
private static splitMediaSections;
|
|
37
|
+
/**
|
|
38
|
+
* 对单个 media section 补全缺失的 extmap
|
|
39
|
+
*
|
|
40
|
+
* 跳过非 m= 段;无 mid 行的段不做处理;已有 URI 的扩展不重复注入。
|
|
41
|
+
*
|
|
42
|
+
* @param { string } section - 单个 SDP 段(session 或 m= 开头)
|
|
43
|
+
* @returns { string } 处理后的段
|
|
44
|
+
*/
|
|
45
|
+
private static patchMediaSection;
|
|
46
|
+
/**
|
|
47
|
+
* 判断 section 内是否已包含指定 URI 的 extmap(不限 extmap id 编号)
|
|
48
|
+
*
|
|
49
|
+
* @param { string } section - 单个 media section
|
|
50
|
+
* @param { string } uri - RTP 扩展 URI
|
|
51
|
+
* @returns { boolean } 是否已存在
|
|
52
|
+
*/
|
|
53
|
+
private static hasExtmapUri;
|
|
54
|
+
/**
|
|
55
|
+
* 收集当前 section 需要追加的 extmap 行
|
|
56
|
+
*
|
|
57
|
+
* 缺 abs-send-time 补 extmap:4,缺 transport-wide-cc 补 extmap:7;两者独立判断,避免重复注入。
|
|
58
|
+
*
|
|
59
|
+
* @param { string } section - 单个 media section
|
|
60
|
+
* @returns { string[] } 待插入的 extmap 行列表
|
|
61
|
+
*/
|
|
62
|
+
private static buildMissingExtmapLines;
|
|
63
|
+
}
|
package/main/quality/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ declare class Quality {
|
|
|
25
25
|
private localPort;
|
|
26
26
|
private remoteIP;
|
|
27
27
|
private remotePort;
|
|
28
|
+
private usePrivateIp;
|
|
28
29
|
private currentRoundTripTime;
|
|
29
30
|
private senderRoundTripTime;
|
|
30
31
|
private cacheCandidatePair;
|
|
@@ -64,6 +65,10 @@ declare class Quality {
|
|
|
64
65
|
* @param { IWorkerVideoReceiver[] } senderStatsList - 原始质量数据
|
|
65
66
|
*/
|
|
66
67
|
statsCandidate(data: any): void;
|
|
68
|
+
/**
|
|
69
|
+
* 重置候选网络信息(ICE 异常时由主线程触发)
|
|
70
|
+
*/
|
|
71
|
+
resetCandidateInfo(): void;
|
|
67
72
|
/**
|
|
68
73
|
* 更新候选对信息
|
|
69
74
|
* 包含:availableOutgoingBitrate、bytesSent、bytesReceived、currentRoundTripTime等信息
|
|
@@ -127,6 +132,27 @@ declare class Quality {
|
|
|
127
132
|
* @param { any } report - 远端候选信息
|
|
128
133
|
*/
|
|
129
134
|
private updateRemoteCandidate;
|
|
135
|
+
/**
|
|
136
|
+
* 判定 IP 是否为内网地址
|
|
137
|
+
*
|
|
138
|
+
* 覆盖:
|
|
139
|
+
* - IPv4 私网:10.0.0.0/8、172.16.0.0/12、192.168.0.0/16
|
|
140
|
+
* - IPv4 链路本地:169.254.0.0/16
|
|
141
|
+
* - IPv6 回环:::1
|
|
142
|
+
* - IPv6 ULA:fc00::/7(首字节 0xFC/0xFD)
|
|
143
|
+
*
|
|
144
|
+
* 不计入:
|
|
145
|
+
* - IPv4 回环 127.0.0.0/8(媒体侧不会出现,且语义属于 loopback)
|
|
146
|
+
* - IPv6 链路本地 fe80::/10(同上,语义属于 link-local 而非私网)
|
|
147
|
+
*
|
|
148
|
+
* 兼容:
|
|
149
|
+
* - 大小写(IPv6 spec 允许大写)
|
|
150
|
+
* - 形如 [ipv6] 或 [ipv6]:port 的写法
|
|
151
|
+
*
|
|
152
|
+
* @param { string } ip - 候选 IP 地址
|
|
153
|
+
* @returns { boolean } 是否内网地址
|
|
154
|
+
*/
|
|
155
|
+
private isPrivateIP;
|
|
130
156
|
/**
|
|
131
157
|
* 计算速率
|
|
132
158
|
*
|
package/main/server/index.d.ts
CHANGED
|
@@ -74,6 +74,13 @@ declare class ServerManager {
|
|
|
74
74
|
* 初始化 配置Server地址
|
|
75
75
|
*/
|
|
76
76
|
private init;
|
|
77
|
+
/**
|
|
78
|
+
* 解析日志上传地址:仅公有云默认可回落 log.xylink.com,其它环境默认空
|
|
79
|
+
*
|
|
80
|
+
* @param { string } server - 业务网关地址
|
|
81
|
+
* @returns { string } 日志上传 baseUrl
|
|
82
|
+
*/
|
|
83
|
+
private resolveLogServerUrl;
|
|
77
84
|
/**
|
|
78
85
|
* 格式化服务器地址
|
|
79
86
|
*/
|
|
@@ -126,6 +133,18 @@ declare class ServerManager {
|
|
|
126
133
|
* @returns Promise<IConfMgmtUrl | null>
|
|
127
134
|
*/
|
|
128
135
|
getConfMgmtUrl(): Promise<IConfMgmtUrl | null>;
|
|
136
|
+
/**
|
|
137
|
+
* 获取 AI 助手 iframe 地址(serverConfig.pcMeetingAIAssistantUrl,并拼接 locale)
|
|
138
|
+
*
|
|
139
|
+
* @returns { Promise<string> } 完整 URL,无配置或未连接信令时为空字符串
|
|
140
|
+
*/
|
|
141
|
+
getAiCopilotUrl(): Promise<string>;
|
|
142
|
+
/**
|
|
143
|
+
* 获取文字转写 iframe 地址(serverConfig.historySubtitle + 会议参数)
|
|
144
|
+
*
|
|
145
|
+
* @returns { Promise<string> } 完整 URL,无配置或未连接信令时为空字符串
|
|
146
|
+
*/
|
|
147
|
+
getTranscriptionUrl(): Promise<string>;
|
|
129
148
|
/**
|
|
130
149
|
* 获取详细的会控地址
|
|
131
150
|
*
|
|
@@ -31,10 +31,14 @@ export interface XYServerUrlInfo {
|
|
|
31
31
|
* @property { string } meetingControlMemebersUrl - 会控参会者地址
|
|
32
32
|
* @property { string } sidebarMeetingControlUrl - 会控侧边栏地址
|
|
33
33
|
* @property { string } whiteBoard - 白板地址
|
|
34
|
+
* @property { string } pcMeetingAIAssistantUrl - AI 助手页面地址
|
|
35
|
+
* @property { string } historySubtitle - 文字转写页面地址
|
|
34
36
|
*/
|
|
35
37
|
export interface ClientServerConfig {
|
|
36
38
|
webServerUrl?: string;
|
|
37
39
|
clientIm?: string;
|
|
40
|
+
pcMeetingAIAssistantUrl?: string;
|
|
41
|
+
historySubtitle?: string;
|
|
38
42
|
errorcode?: ServerLinkData;
|
|
39
43
|
i18n?: string;
|
|
40
44
|
logServer?: string;
|
|
@@ -101,6 +101,10 @@ declare class ContentTrack extends BaseTrack implements XYContentTrackIF {
|
|
|
101
101
|
* @since v4.0.0
|
|
102
102
|
*/
|
|
103
103
|
resume(): Promise<IReturnResult>;
|
|
104
|
+
/**
|
|
105
|
+
* 暂停状态下切换新共享源成功后,恢复内容推流
|
|
106
|
+
*/
|
|
107
|
+
private resumePausedContentAfterReselect;
|
|
104
108
|
/**
|
|
105
109
|
* 创建下一个Content流
|
|
106
110
|
*
|
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.10",
|
|
4
4
|
"author": "jinghui-Luo",
|
|
5
5
|
"email": "luojinghui424@gmail.com",
|
|
6
6
|
"bugs": {
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"@types/clone-deep": "^4.0.4",
|
|
22
22
|
"@types/downloadjs": "^1.4.6",
|
|
23
23
|
"@types/uuid": "^10.0.0",
|
|
24
|
-
"@xylink/xy-encryption": "^1.0.
|
|
24
|
+
"@xylink/xy-encryption": "^1.0.21",
|
|
25
|
+
"@xylink/xy-toolkit": "^1.0.2",
|
|
25
26
|
"@xylink/xy_api_gateway": "0.4.9-lite.6",
|
|
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",
|
|
@@ -37,6 +37,5 @@
|
|
|
37
37
|
"terser": "^5.37.0",
|
|
38
38
|
"uuid": "^10.0.0"
|
|
39
39
|
},
|
|
40
|
-
"dependencies": {},
|
|
41
40
|
"scripts": {}
|
|
42
41
|
}
|
package/tools/config.d.ts
CHANGED
|
@@ -2,6 +2,31 @@ import { XYVersion } from '../type/base';
|
|
|
2
2
|
export declare const SDKVersion: XYVersion;
|
|
3
3
|
export declare const version: string;
|
|
4
4
|
export declare const serverProtocolMap: Record<string, string>;
|
|
5
|
+
/** 公有云默认 REST 网关域名 */
|
|
6
|
+
export declare const PUBLIC_CLOUD_HOST = "cloudapi.xylink.com";
|
|
7
|
+
/** 公有云默认日志上传域名(仅公有云网关时使用) */
|
|
8
|
+
export declare const PUBLIC_LOG_HOST = "log.xylink.com";
|
|
9
|
+
/**
|
|
10
|
+
* 规范化服务器 host(去协议、路径、端口)
|
|
11
|
+
*
|
|
12
|
+
* @param { string } server - 服务器地址
|
|
13
|
+
* @returns { string } host
|
|
14
|
+
*/
|
|
15
|
+
export declare const normalizeServerHost: (server?: string) => string;
|
|
16
|
+
/**
|
|
17
|
+
* 是否为公有云默认网关
|
|
18
|
+
*
|
|
19
|
+
* @param { string } server - 服务器地址
|
|
20
|
+
* @returns { boolean }
|
|
21
|
+
*/
|
|
22
|
+
export declare const isPublicCloudServer: (server?: string) => boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 根据业务网关解析默认日志上传 host;非公有云默认返回空
|
|
25
|
+
*
|
|
26
|
+
* @param { string } server - 业务网关地址
|
|
27
|
+
* @returns { string } 日志 host,无默认值时返回空字符串
|
|
28
|
+
*/
|
|
29
|
+
export declare const getDefaultLogHost: (server?: string) => "" | "log.xylink.com";
|
|
5
30
|
export declare const proxy: {
|
|
6
31
|
wssProtocol: string;
|
|
7
32
|
protocol: string;
|