@xylink/xy-rtc-sdk 4.0.9 → 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 +6 -0
- 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 +2 -0
- package/main/client/index.d.ts +55 -4
- 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 +8 -0
- package/type/index.d.ts +1 -0
- package/type/meeting.d.ts +59 -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 +5641 -4962
package/action/api.d.ts
CHANGED
|
@@ -39,9 +39,13 @@ declare class XYApi {
|
|
|
39
39
|
*/
|
|
40
40
|
static checkCaptchaImage: APIUrlInfo;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* 根据图形验证码获取短信验证码(公有云/分区云)
|
|
43
43
|
*/
|
|
44
44
|
static verificationCode: APIUrlInfo;
|
|
45
|
+
/**
|
|
46
|
+
* 根据图形验证码获取短信验证码(农商行,加密)
|
|
47
|
+
*/
|
|
48
|
+
static verificationCodeSec: APIUrlInfo;
|
|
45
49
|
/**
|
|
46
50
|
* 新用户注册并登录
|
|
47
51
|
*/
|
|
@@ -262,6 +266,18 @@ declare class XYApi {
|
|
|
262
266
|
* 日志上传
|
|
263
267
|
*/
|
|
264
268
|
static uploadLog: APIUrlInfo;
|
|
269
|
+
/**
|
|
270
|
+
* 参会者发送文字转写申请
|
|
271
|
+
*/
|
|
272
|
+
static transcriptionApply: APIUrlInfo;
|
|
273
|
+
/**
|
|
274
|
+
* 主持人审批文字转写申请(同意 / 拒绝 / 不再接受)
|
|
275
|
+
*/
|
|
276
|
+
static transcriptionApproval: APIUrlInfo;
|
|
277
|
+
/**
|
|
278
|
+
* 获取当前转写权限与待处理申请状态(主持人再入会时主动拉取)
|
|
279
|
+
*/
|
|
280
|
+
static transcriptionPermission: APIUrlInfo;
|
|
265
281
|
/**
|
|
266
282
|
* 校验入会名称敏感词
|
|
267
283
|
* 注意:仅支持公有云
|
package/action/auth.d.ts
CHANGED
|
@@ -97,10 +97,21 @@ declare class AuthAction extends BaseAction {
|
|
|
97
97
|
/**
|
|
98
98
|
* 根据图形验证获取验证码
|
|
99
99
|
*
|
|
100
|
-
* @param { string } phone -
|
|
100
|
+
* @param { string } phone - 手机号,格式:{countryCode}-{tel}
|
|
101
|
+
* @param { object } options - 请求选项
|
|
102
|
+
* @param { boolean } options.useSecApi - 是否使用加密接口(农商行)
|
|
101
103
|
* @returns
|
|
102
104
|
*/
|
|
103
|
-
getVerificationCode: (phone: string
|
|
105
|
+
getVerificationCode: (phone: string, options?: {
|
|
106
|
+
useSecApi?: boolean;
|
|
107
|
+
}) => Promise<any>;
|
|
108
|
+
/**
|
|
109
|
+
* [农商行]根据图形验证获取验证码(加密)
|
|
110
|
+
*
|
|
111
|
+
* @param { string } account - 账号,格式:{countryCode}-{tel}
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
114
|
+
private getVerificationCodeEncrypt;
|
|
104
115
|
/**
|
|
105
116
|
* 获取公钥,加密登录需使用此公钥
|
|
106
117
|
*
|
package/action/control.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignInTextParams } from '../type/meeting';
|
|
1
|
+
import { SignInTextParams, XYTranscriptionApprovalParams } from '../type/meeting';
|
|
2
2
|
import { default as Action } from '.';
|
|
3
3
|
import { default as BaseAction } from './base';
|
|
4
4
|
import { FocusViewAction } from '../type/client';
|
|
@@ -63,6 +63,20 @@ declare class MeetingControlAction extends BaseAction {
|
|
|
63
63
|
* 获取会控侧边栏会议信息,包含是否是主持人、是否需要会控密码等
|
|
64
64
|
*/
|
|
65
65
|
fetchMeetingControlInfo(): Promise<any>;
|
|
66
|
+
/**
|
|
67
|
+
* 参会者发送文字转写申请
|
|
68
|
+
*/
|
|
69
|
+
applyTranscription(): Promise<any>;
|
|
70
|
+
/**
|
|
71
|
+
* 主持人审批文字转写申请
|
|
72
|
+
*
|
|
73
|
+
* @param { XYTranscriptionApprovalParams } params - 审批参数
|
|
74
|
+
*/
|
|
75
|
+
approveTranscription(params: XYTranscriptionApprovalParams): Promise<any>;
|
|
76
|
+
/**
|
|
77
|
+
* 查询当前会议的转写权限及待处理转写申请状态(主持人再入会时主动拉取)
|
|
78
|
+
*/
|
|
79
|
+
getTranscriptionPermissionInfo(): Promise<any>;
|
|
66
80
|
endAllMeeting(): Promise<any>;
|
|
67
81
|
/**
|
|
68
82
|
* 监会操作
|
package/action/index.d.ts
CHANGED
package/action/meeting.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as Action } from '.';
|
|
2
2
|
import { default as BaseAction } from './base';
|
|
3
3
|
import { IMeetingInviteParams } from '../type/action';
|
|
4
|
-
import { AutoMute } from '../type/index';
|
|
4
|
+
import { AutoMute, TShowLanguage } from '../type/index';
|
|
5
5
|
/**
|
|
6
6
|
* 会议室管理模块
|
|
7
7
|
*/
|
|
@@ -123,9 +123,11 @@ declare class MeetingAction extends BaseAction {
|
|
|
123
123
|
createVirtualPeople(): Promise<any>;
|
|
124
124
|
/**
|
|
125
125
|
* 开启字幕
|
|
126
|
-
*
|
|
126
|
+
*
|
|
127
|
+
* @param { TShowLanguage } showLanguage - 展示语言 20260626增加
|
|
128
|
+
* @returns { Promise<IReturnResult> } - 返回结果
|
|
127
129
|
*/
|
|
128
|
-
startSubtitles(): Promise<any>;
|
|
130
|
+
startSubtitles(showLanguage?: TShowLanguage): Promise<any>;
|
|
129
131
|
/**
|
|
130
132
|
* 停止字幕
|
|
131
133
|
* @returns
|
package/enum/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
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
|
+
export * from './meeting';
|
|
5
|
+
/**
|
|
6
|
+
* 候选对稳定判定阈值
|
|
7
|
+
* 连续 N 次(每次 2s 间隔)remoteCandidateId 不变即视为稳定
|
|
8
|
+
*/
|
|
9
|
+
export declare const CANDIDATE_STABLE_THRESHOLD = 20;
|
|
4
10
|
/**
|
|
5
11
|
* 日志最大缓存条数
|
|
6
12
|
*/
|
package/enum/meeting.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { TShowLanguage } from '../type/client';
|
|
2
|
+
import { XYTranscriptionLang } from '../type/index';
|
|
1
3
|
import { XYNotificationType } from '../type/meeting';
|
|
2
4
|
/**
|
|
3
5
|
* 签到文案匹配
|
|
@@ -10,5 +12,39 @@ export declare const COPY_WRITING: Record<number, string>;
|
|
|
10
12
|
* @property { 52 } HOST - 主持人
|
|
11
13
|
* @property { 53 } CO_CHAIR - 联席主持人
|
|
12
14
|
* @property { 54 } RENAME - 改名权限
|
|
15
|
+
* @property { 62 } TRANSCRIPTION - 转写权限
|
|
13
16
|
*/
|
|
14
17
|
export declare const NotificationTypeMap: Record<number, XYNotificationType>;
|
|
18
|
+
/**
|
|
19
|
+
* 文字转写录制权限
|
|
20
|
+
* 0 - 允许参会成员开启和停止文字转写
|
|
21
|
+
* 1 - 仅允许主持人开启和停止文字转写
|
|
22
|
+
*/
|
|
23
|
+
export declare enum XYTranscriptionAuthority {
|
|
24
|
+
ALL = "0",
|
|
25
|
+
HOST = "1"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 文字转写申请状态
|
|
29
|
+
*
|
|
30
|
+
* @param { APPLYING } applying - 申请中,等待主持人审批
|
|
31
|
+
* @param { APPROVED } approved - 已通过(主持人同意,转写已开启)
|
|
32
|
+
* @param { REJECTED } rejected - 已拒绝
|
|
33
|
+
* @param { TIMEOUT } timeout - 超时(2分钟未处理,按拒绝处理)
|
|
34
|
+
* @param { STOP_ACCEPTING } stop_accepting - 主持人设置本场会议不再接受新请求
|
|
35
|
+
*/
|
|
36
|
+
export declare enum XYTranscriptionApplicationStatus {
|
|
37
|
+
APPLYING = "applying",
|
|
38
|
+
APPROVED = "approved",
|
|
39
|
+
REJECTED = "rejected",
|
|
40
|
+
TIMEOUT = "timeout",
|
|
41
|
+
STOP_ACCEPTING = "stop_accepting"
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 文字转写语言映射
|
|
45
|
+
*
|
|
46
|
+
* @param { Chinese } Chinese - 中文
|
|
47
|
+
* @param { English } English - 英文
|
|
48
|
+
* @param { ChEn } ChEn - 中英文
|
|
49
|
+
*/
|
|
50
|
+
export declare const XYTranscriptionLangMap: Record<TShowLanguage, XYTranscriptionLang>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { default as XYRTCClient } from '../../main/client';
|
|
2
|
+
import { IReturnResult, XYBaseModule } from '../../type/index';
|
|
3
|
+
import { XYThemeOptions } from '../../type/theme';
|
|
4
|
+
export declare const XY_BRIDGE_SOURCE = "xy-caption-bridge";
|
|
5
|
+
type Envelope = {
|
|
6
|
+
source: typeof XY_BRIDGE_SOURCE;
|
|
7
|
+
type: string;
|
|
8
|
+
content: unknown;
|
|
9
|
+
};
|
|
10
|
+
export type XYAiCopilotInitialPayload = {
|
|
11
|
+
userProfile?: unknown;
|
|
12
|
+
currentLang?: string;
|
|
13
|
+
displayMode?: 'light' | 'dark';
|
|
14
|
+
};
|
|
15
|
+
export declare class XYAiCopilotClient implements XYBaseModule {
|
|
16
|
+
private client;
|
|
17
|
+
private logger;
|
|
18
|
+
private iframe;
|
|
19
|
+
private receiveFromChildHandler;
|
|
20
|
+
private ready;
|
|
21
|
+
private pendingInitialPayload;
|
|
22
|
+
private options?;
|
|
23
|
+
constructor(client: XYRTCClient);
|
|
24
|
+
/**
|
|
25
|
+
* 连接 SDK 与 AI 助手 iframe
|
|
26
|
+
*/
|
|
27
|
+
connectWidget(iframeId: string, options?: XYThemeOptions): Promise<IReturnResult>;
|
|
28
|
+
private init;
|
|
29
|
+
/**
|
|
30
|
+
* 获取 AI 助手 H5 完整地址
|
|
31
|
+
*/
|
|
32
|
+
getAiCopilotUrl(): Promise<string>;
|
|
33
|
+
private appendPlWeb;
|
|
34
|
+
postToIframe(message: Record<string, unknown>): void;
|
|
35
|
+
postEnvelope(envelope: Omit<Envelope, 'source'> & {
|
|
36
|
+
source?: Envelope['source'];
|
|
37
|
+
}): void;
|
|
38
|
+
sendUserProfile(userProfile: unknown): void;
|
|
39
|
+
sendCurrentLang(lang: string): void;
|
|
40
|
+
/** 等价 `displayMode`(spec §1.2 / §2.2 / §6) */
|
|
41
|
+
sendDisplayMode(displayMode: 'light' | 'dark'): void;
|
|
42
|
+
setTheme(theme: XYThemeOptions): void;
|
|
43
|
+
setInitialPayload(payload: XYAiCopilotInitialPayload): void;
|
|
44
|
+
private flushInitialPayload;
|
|
45
|
+
private buildDefaultInitialPayload;
|
|
46
|
+
private handleIframeMessage;
|
|
47
|
+
private parseIncoming;
|
|
48
|
+
private detachIframeSession;
|
|
49
|
+
destroy(): void;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
package/feature/im/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as XYRTCClient } from '../../main/client';
|
|
2
2
|
import { IReturnResult, XYBaseModule, XYIMEventKey } from '../../type/index';
|
|
3
3
|
import { XYEmitter } from '@xylink/xy-toolkit';
|
|
4
|
+
import { XYThemeOptions } from '../../type/theme';
|
|
4
5
|
export declare class XYIMClient extends XYEmitter<XYIMEventKey> implements XYBaseModule {
|
|
5
6
|
private client;
|
|
6
7
|
private logger;
|
|
@@ -8,6 +9,7 @@ export declare class XYIMClient extends XYEmitter<XYIMEventKey> implements XYBas
|
|
|
8
9
|
private receiveFromChildHandler;
|
|
9
10
|
private sendViewPortTimer;
|
|
10
11
|
private sendViewPortInterval;
|
|
12
|
+
private options?;
|
|
11
13
|
constructor(client: XYRTCClient);
|
|
12
14
|
/**
|
|
13
15
|
* 连接SDK与IM iframe
|
|
@@ -15,7 +17,7 @@ export declare class XYIMClient extends XYEmitter<XYIMEventKey> implements XYBas
|
|
|
15
17
|
* @param { string } imWidgetID - IM iframe
|
|
16
18
|
* @returns { Promise<IReturnResult> } - 结果
|
|
17
19
|
*/
|
|
18
|
-
connectIMWidget(imWidgetID: string): Promise<IReturnResult>;
|
|
20
|
+
connectIMWidget(imWidgetID: string, options?: XYThemeOptions): Promise<IReturnResult>;
|
|
19
21
|
/**
|
|
20
22
|
* 初始化
|
|
21
23
|
*/
|
|
@@ -85,4 +87,5 @@ export declare class XYIMClient extends XYEmitter<XYIMEventKey> implements XYBas
|
|
|
85
87
|
* @returns { string } - im地址
|
|
86
88
|
*/
|
|
87
89
|
private getClientImUrl;
|
|
90
|
+
setTheme(theme: XYThemeOptions): void;
|
|
88
91
|
}
|
|
@@ -26,5 +26,6 @@ export declare enum IM_TYPE {
|
|
|
26
26
|
XY_SHARE_CHAT_CONTENT_PERMISSION = "XY_SHARE_CHAT_CONTENT_PERMISSION",
|
|
27
27
|
XY_VIEWPORT_SIZE = "XY_VIEWPORT_SIZE",
|
|
28
28
|
XY_INPUT_FOCUS = "XY_INPUT_FOCUS",
|
|
29
|
-
XY_CLIENT_CONFIG = "XY_CLIENT_CONFIG"
|
|
29
|
+
XY_CLIENT_CONFIG = "XY_CLIENT_CONFIG",
|
|
30
|
+
XY_THEME = "XY_THEME"
|
|
30
31
|
}
|
package/feature/index.d.ts
CHANGED
|
@@ -17,6 +17,15 @@ export * from './edu/index.type';
|
|
|
17
17
|
*/
|
|
18
18
|
export { XYIMClient } from './im';
|
|
19
19
|
export * from './im/index.type';
|
|
20
|
+
/**
|
|
21
|
+
* 会中文字转写(iframe)
|
|
22
|
+
*/
|
|
23
|
+
export { XYTranscriptionClient } from './transcription';
|
|
24
|
+
export * from './transcription/index.type';
|
|
25
|
+
/**
|
|
26
|
+
* 会中 AI 助手(iframe)
|
|
27
|
+
*/
|
|
28
|
+
export { XYAiCopilotClient } from './aiCopilot';
|
|
20
29
|
/**
|
|
21
30
|
* 接口查询模块
|
|
22
31
|
*/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as XYRTCClient } from '../../main/client';
|
|
2
|
+
import { IReturnResult } from '../../type/index';
|
|
3
|
+
import { XYThemeOptions } from '../../type/theme';
|
|
4
|
+
/** 与会控 H5 WebMessageBridge 约定的 `source`(iframe 侧校验 data.source) */
|
|
5
|
+
export declare const XY_MEETING_CONTROL_BRIDGE_SOURCE = "xy-meeting-control-bridge";
|
|
6
|
+
export declare class XYMeetingControlClient {
|
|
7
|
+
private readonly client;
|
|
8
|
+
private logger;
|
|
9
|
+
private iframe;
|
|
10
|
+
private receiveFromChildHandler;
|
|
11
|
+
constructor(client: XYRTCClient);
|
|
12
|
+
/**
|
|
13
|
+
* 连接 SDK 与会控 iframe
|
|
14
|
+
*
|
|
15
|
+
* @param { string } iframeId - 会控 iframe DOM id
|
|
16
|
+
* @param { XYThemeOptions } options - 可选;传入时在连接后立即下发主题
|
|
17
|
+
* @returns { Promise<IReturnResult> } - 结果
|
|
18
|
+
*/
|
|
19
|
+
connectWidget(iframeId: string, options?: XYThemeOptions): Promise<IReturnResult>;
|
|
20
|
+
private handleIframeMessage;
|
|
21
|
+
/**
|
|
22
|
+
* 向会控 iframe 下发会中主题(`type` 为 `THEME_TYPE.XY_THEME`)。
|
|
23
|
+
*
|
|
24
|
+
* @param { XYThemeOptions } content - 品牌色短键表与亮暗模式
|
|
25
|
+
*/
|
|
26
|
+
setTheme(content: XYThemeOptions): void;
|
|
27
|
+
private postEnvelope;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { default as XYRTCClient } from '../../main/client';
|
|
2
|
+
import { IReturnResult, XYBaseModule } from '../../type/index';
|
|
3
|
+
import { XYTranscriptionWidgetConnectOptions, XYTranscriptionLang, XYTranscriptionAppAction } from './index.type';
|
|
4
|
+
import { XYThemeOptions } from '../../type/theme';
|
|
5
|
+
/** 与文字转写 H5 WebMessageBridge 约定的 source(iframe 侧校验 data.source) */
|
|
6
|
+
export declare const XY_BRIDGE_SOURCE = "xy-caption-bridge";
|
|
7
|
+
export declare class XYTranscriptionClient implements XYBaseModule {
|
|
8
|
+
private client;
|
|
9
|
+
private logger;
|
|
10
|
+
private iframe;
|
|
11
|
+
/** `connectWidget` 传入的主题与可选 `messageToNative` 回调 */
|
|
12
|
+
private widgetConnectOptions?;
|
|
13
|
+
private receiveFromChildHandler;
|
|
14
|
+
/** 当前会议周期内,首次连接/订阅文字转写并成功下发初始数据的时间戳(毫秒) */
|
|
15
|
+
private firstTranscriptionOpenTimeMs;
|
|
16
|
+
constructor(client: XYRTCClient);
|
|
17
|
+
/**
|
|
18
|
+
* 连接 SDK 与文字转写 iframe
|
|
19
|
+
*
|
|
20
|
+
* @param iframeId - 页面上 iframe 元素的 id
|
|
21
|
+
*/
|
|
22
|
+
connectWidget(iframeId: string, options?: XYTranscriptionWidgetConnectOptions): Promise<IReturnResult>;
|
|
23
|
+
private init;
|
|
24
|
+
/**
|
|
25
|
+
* 获取文字转写 H5 完整地址
|
|
26
|
+
*/
|
|
27
|
+
getTranscriptionUrl(): Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* 子 iframe 发来 caption-subscribe 后下发初始数据
|
|
30
|
+
*/
|
|
31
|
+
private sendCaptionInitialPayload;
|
|
32
|
+
/**
|
|
33
|
+
* 向 iframe 发送会中主题
|
|
34
|
+
*
|
|
35
|
+
* @param globalColorConfig - 会中主题颜色配置
|
|
36
|
+
* @param displayMode - 会中主题亮暗模式
|
|
37
|
+
*/
|
|
38
|
+
setTheme(content: XYThemeOptions): void;
|
|
39
|
+
/**
|
|
40
|
+
* 向 iframe 发送clientId等相关信息
|
|
41
|
+
*/
|
|
42
|
+
sendClientConfig(): void;
|
|
43
|
+
/**
|
|
44
|
+
* 同一次会议中,终端第一次打开文字转写(iframe 初始下发)的时间戳(毫秒字符串)。
|
|
45
|
+
* 与 {@link XYTranslationManager.startTranslation} 通话字幕首次时间无关。
|
|
46
|
+
*/
|
|
47
|
+
sendCurrentTimestamp(): void;
|
|
48
|
+
/**
|
|
49
|
+
* 终端通话字幕语言切换
|
|
50
|
+
*
|
|
51
|
+
* @param lang - 语言:0 / 1 / 2(与文字转写 H5 约定一致)
|
|
52
|
+
*/
|
|
53
|
+
sendCurrentLang(lang?: XYTranscriptionLang): void;
|
|
54
|
+
/**
|
|
55
|
+
* 会中-实时转写-会中实时转写消息
|
|
56
|
+
*
|
|
57
|
+
* @param captionMsg
|
|
58
|
+
*/
|
|
59
|
+
sendCaptionMsg(captionMsg: string): void;
|
|
60
|
+
/**
|
|
61
|
+
* 会中-实时转写-文字转写页面打开行为
|
|
62
|
+
*
|
|
63
|
+
* 勾选「同时开启文字转写,实时查看转写内容」(`connectWidget` 传入 `autoStartTranscription: true`)时下发 `openAutoStart`(H5 打开后自动开启转写),否则下发 `openOnly`(仅打开转写页面)。
|
|
64
|
+
* 须在 {@link XYTranscriptionClient.sendTranscriptionMeetingInfo} 之前完成推送。
|
|
65
|
+
*
|
|
66
|
+
* @param action - 可选;显式指定打开行为。未传时按 {@link XYTranscriptionWidgetConnectOptions.autoStartTranscription} 决定。
|
|
67
|
+
*/
|
|
68
|
+
sendCaptionAppAction(action?: XYTranscriptionAppAction): void;
|
|
69
|
+
/**
|
|
70
|
+
* 会中-实时转写-订阅响应终端的'transcription-meeting-info',记录会议-会议信息
|
|
71
|
+
*/
|
|
72
|
+
sendTranscriptionMeetingInfo(): void;
|
|
73
|
+
/**
|
|
74
|
+
* 会中-实时转写-会控消息,content是会控上报的实时转写权限body json string
|
|
75
|
+
*/
|
|
76
|
+
sendCaptionMeetingControl(requestContentJson: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* 会中-实时转写-转写状态,透传 string
|
|
79
|
+
*/
|
|
80
|
+
sendCaptionState(state: string): void;
|
|
81
|
+
private handleIframeMessage;
|
|
82
|
+
private handleMessageToNative;
|
|
83
|
+
/**
|
|
84
|
+
* 仅断开当前 iframe 会话,不清缓存(重连前调用)
|
|
85
|
+
*/
|
|
86
|
+
private detachIframeSession;
|
|
87
|
+
private postEnvelope;
|
|
88
|
+
destroy(): void;
|
|
89
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { XYThemeOptions } from '../../type/theme';
|
|
2
|
+
/**
|
|
3
|
+
* `connectWidget` 入参:在 {@link XYThemeOptions} 上增加 iframe → 宿主的 `messageToNative` 回调,不经过 SDK 客户端全局 `emit` 事件。
|
|
4
|
+
*
|
|
5
|
+
* @param { Record<string, string> } globalColorConfig - 与 {@link XYThemeOptions} 相同
|
|
6
|
+
* @param { 'light' | 'dark' } displayMode - 与 {@link XYThemeOptions} 相同
|
|
7
|
+
* @param { (data: { type: string; content: unknown }) => void } onMessageToNative - 可选;子 iframe 内层 `{ type, content }`(如 `transcription-approval`)
|
|
8
|
+
* @param { boolean } autoStartTranscription - 可选;勾选「同时开启文字转写,实时查看转写内容」时传 `true`,H5 打开后自动开启转写(下发 `caption-app-action: openAutoStart`),否则仅打开转写页面(`openOnly`)。默认 `false`
|
|
9
|
+
*/
|
|
10
|
+
export interface XYTranscriptionWidgetConnectOptions extends XYThemeOptions {
|
|
11
|
+
onMessageToNative?: (data: {
|
|
12
|
+
type: string;
|
|
13
|
+
content: unknown;
|
|
14
|
+
}) => void;
|
|
15
|
+
autoStartTranscription?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 文字转写 iframe 与宿主消息 type(枚举值为与 H5 约定的字符串,勿改)
|
|
19
|
+
*
|
|
20
|
+
* @param XY_CLIENT_CONFIG - 发送 clientId 等相关信息
|
|
21
|
+
* @param NATIVE_TO_WEB - 会中-实时转写-会中实时转写消息, 父应用 -> 子iframe 推送消息
|
|
22
|
+
* @param CURRENT_TIMESTAMP - 同一次会议中首次打开文字转写的时间戳
|
|
23
|
+
* @param CURRENT_LANG - 终端当前语言
|
|
24
|
+
* @param XY_THEME - 会中主题
|
|
25
|
+
* @param XY_CUSTOM_CONFIG - 自定义扩展配置(如实时转写审批开关)
|
|
26
|
+
* @param MESSAGE_TO_H5 - 子iframe -> 父应用 推送消息
|
|
27
|
+
*/
|
|
28
|
+
export declare enum TRANSCRIPTION_TYPE {
|
|
29
|
+
XY_CLIENT_CONFIG = "xy-client-config",
|
|
30
|
+
MESSAGE_TO_H5 = "native-to-web",
|
|
31
|
+
CURRENT_TIMESTAMP = "current-timestamp",
|
|
32
|
+
CURRENT_LANG = "current-lang",
|
|
33
|
+
XY_THEME = "XY_THEME",
|
|
34
|
+
MESSAGE_TO_NATIVE = "messageToNative"
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 文字转写 父应用 -> 子iframe 推送消息类型
|
|
38
|
+
*
|
|
39
|
+
* @param VOD_CAPTION_MSG - 实时转写消息
|
|
40
|
+
* @param CAPTION_MEETING_CONTROL - 客户端-实时转写-会控权限控制消息
|
|
41
|
+
* @param TRANSCRIPTION_MEETING_INFO - 会议基础数据
|
|
42
|
+
* @param CAPTION_STATE - 会中->实时转写-转写状态
|
|
43
|
+
* @param CAPTION_MSG - 会中-实时转写-会中实时转写消息
|
|
44
|
+
* @param CAPTION_APP_ACTION - 文字转写页面打开行为(自动开启转写 / 仅打开页面)
|
|
45
|
+
*/
|
|
46
|
+
export declare enum MESSAGE_TO_H5_TYPE {
|
|
47
|
+
VOD_CAPTION_MSG = "vod-caption-msg",
|
|
48
|
+
CAPTION_MEETING_CONTROL = "caption-meeting-control",
|
|
49
|
+
TRANSCRIPTION_MEETING_INFO = "transcription-meeting-info",
|
|
50
|
+
CAPTION_STATE = "caption-state",
|
|
51
|
+
CAPTION_APP_ACTION = "caption-app-action"
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 文字转写页面打开行为,决定 H5 打开时是否自动开启转写功能
|
|
55
|
+
*
|
|
56
|
+
* @param OPEN_AUTO_START - 打开时自动开启转写功能(录制 + 转写同时开启时使用)
|
|
57
|
+
* @param OPEN_ONLY - 仅打开转写页面,不自动开启转写功能
|
|
58
|
+
*/
|
|
59
|
+
export declare enum XYTranscriptionAppAction {
|
|
60
|
+
OPEN_AUTO_START = "openAutoStart",
|
|
61
|
+
OPEN_ONLY = "openOnly"
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* 子iframe -> 父应用 推送消息类型
|
|
65
|
+
*/
|
|
66
|
+
export declare enum MESSAGE_TO_NATIVE_TYPE {
|
|
67
|
+
TRANSCRIPTION_APPROVAL = "transcription-approval",
|
|
68
|
+
CAPTION_SUBSCRIBE = "caption-subscribe"
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* 语言类型
|
|
72
|
+
*
|
|
73
|
+
* @param ZH 中文
|
|
74
|
+
* @param EN 英文
|
|
75
|
+
* @param ZH_AND_EN 中英文
|
|
76
|
+
*/
|
|
77
|
+
export declare enum XYTranscriptionLang {
|
|
78
|
+
ZH = 0,
|
|
79
|
+
EN = 1,
|
|
80
|
+
ZH_AND_EN = 2
|
|
81
|
+
}
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import { default as Client } from '../../main/client';
|
|
2
|
-
import { TLocalLanguage } from '../../type/client';
|
|
2
|
+
import { TLocalLanguage, TShowLanguage } from '../../type/client';
|
|
3
3
|
declare class XYTranslationManager {
|
|
4
4
|
private client;
|
|
5
5
|
private logger;
|
|
6
6
|
private isSubscribeTranslation;
|
|
7
|
+
private firstTranslationStartTime;
|
|
8
|
+
private showLanguage;
|
|
7
9
|
constructor(client: Client);
|
|
10
|
+
/**
|
|
11
|
+
* 获取会议第一次开启字幕的时间
|
|
12
|
+
*
|
|
13
|
+
* @returns {number} 时间戳(毫秒)
|
|
14
|
+
*/
|
|
15
|
+
getFirstTranslationStartTime(): number;
|
|
8
16
|
/**
|
|
9
17
|
* 开启通话字幕
|
|
18
|
+
*
|
|
19
|
+
* @param { TLocalLanguage } showLanguage - 展示语言 20260626增加
|
|
20
|
+
* @returns { Promise<IReturnResult> } - 返回结果
|
|
10
21
|
*/
|
|
11
|
-
startTranslation(): Promise<import('../..').IReturnResult>;
|
|
22
|
+
startTranslation(showLanguage?: TShowLanguage): Promise<import('../..').IReturnResult>;
|
|
12
23
|
/**
|
|
13
24
|
* 停止通话字幕
|
|
14
25
|
*/
|
|
@@ -19,9 +30,10 @@ declare class XYTranslationManager {
|
|
|
19
30
|
* 相关内容:通话字幕
|
|
20
31
|
*
|
|
21
32
|
* @param { TLocalLanguage } language - 设置的语言
|
|
33
|
+
* @param { TShowLanguage } showLanguage - 展示语言 20260626增加
|
|
22
34
|
* @returns { Promise<IReturnResult> } - 返回结果
|
|
23
35
|
*/
|
|
24
|
-
setTranslationLanguage(language: TLocalLanguage): Promise<import('../..').IReturnResult>;
|
|
36
|
+
setTranslationLanguage(language: TLocalLanguage, showLanguage?: TShowLanguage): Promise<import('../..').IReturnResult>;
|
|
25
37
|
/**
|
|
26
38
|
* 重新开启通话字幕
|
|
27
39
|
* 调用时机:startTranslation开启字幕功能后调用,媒体网关断开重连后调用
|
|
@@ -30,5 +42,13 @@ declare class XYTranslationManager {
|
|
|
30
42
|
* @returns { Promise<IReturnResult> } - 返回结果
|
|
31
43
|
*/
|
|
32
44
|
reStartTranslation(): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* 获取最近一次设置的通话字幕显示语言
|
|
47
|
+
*
|
|
48
|
+
* @returns { TShowLanguage } 显示语言
|
|
49
|
+
*/
|
|
50
|
+
getShowLanguage(): TShowLanguage;
|
|
51
|
+
subscribeTranslation(): void;
|
|
52
|
+
unsubscribeTranslation(): void;
|
|
33
53
|
}
|
|
34
54
|
export default XYTranslationManager;
|
package/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { Logger } from './export/tools';
|
|
|
5
5
|
import { ICheckSystemRequirements } from '@xylink/xy-toolkit';
|
|
6
6
|
import { IClientConfig, TLocale, XYVersion } from './type/index';
|
|
7
7
|
import { XYIMClient } from './feature/im';
|
|
8
|
+
import { XYTranscriptionClient } from './feature/transcription';
|
|
9
|
+
import { XYAiCopilotClient } from './feature/aiCopilot';
|
|
8
10
|
import { XYAudioPCMExtension } from './main/plugin/audioPCM/index';
|
|
9
11
|
import { XYAudioPCMProcessor } from './main/plugin/audioPCM/processor';
|
|
10
12
|
export * from './main/helper/index';
|
|
@@ -83,7 +85,7 @@ export default class XYRTC {
|
|
|
83
85
|
/**
|
|
84
86
|
* 导出 MODULES
|
|
85
87
|
*/
|
|
86
|
-
export { XYRTCClient, VideoAudioTrack, ContentTrack, XYIMClient, XYAudioPCMExtension, XYAudioPCMProcessor };
|
|
88
|
+
export { XYRTCClient, VideoAudioTrack, ContentTrack, XYIMClient, XYTranscriptionClient, XYAiCopilotClient, XYAudioPCMExtension, XYAudioPCMProcessor };
|
|
87
89
|
/**
|
|
88
90
|
* 导出 TYPE 类型定义
|
|
89
91
|
*/
|
|
@@ -92,3 +94,7 @@ export * from './type/index';
|
|
|
92
94
|
* 导出错误码
|
|
93
95
|
*/
|
|
94
96
|
export { ERROR_CODE } from './enum/errorCode/server';
|
|
97
|
+
/**
|
|
98
|
+
* 导出文字转写相关枚举
|
|
99
|
+
*/
|
|
100
|
+
export { XYTranscriptionApplicationStatus, XYTranscriptionAuthority, XYTranscriptionLangMap } from './enum/meeting';
|
|
@@ -364,6 +364,13 @@ export declare enum XYClientEventKey {
|
|
|
364
364
|
* 关联内容:高级功能-通话字幕
|
|
365
365
|
*/
|
|
366
366
|
TRANSCRIPTION_STATUS = "transcription-status",
|
|
367
|
+
/**
|
|
368
|
+
* 实时转写权限与申请状态变更事件
|
|
369
|
+
*
|
|
370
|
+
* 每次收到服务端 TRANSCRIPTION 类型通知时触发,Payload 为已解析的 {@link XYTranscriptionPermission} 对象。
|
|
371
|
+
* 主持人收到 application=applying 时可弹出审批弹框;参会者收到 rejected/timeout 时显示拒绝提示。
|
|
372
|
+
*/
|
|
373
|
+
TRANSCRIPTION_PERMISSION = "transcription-permission",
|
|
367
374
|
/**
|
|
368
375
|
* ==================分组:其他==================
|
|
369
376
|
*/
|
package/main/ability/index.d.ts
CHANGED
|
@@ -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
|
}
|