@xylink/xy-rtc-sdk 4.0.11-beta.0 → 4.0.11-beta.1
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 +8 -0
- package/action/config.d.ts +8 -1
- package/action/index.d.ts +3 -0
- package/action/sensitiveMask.d.ts +13 -0
- package/enum/index.d.ts +1 -1
- package/index.d.ts +1 -0
- package/interface/clientInterface.type.d.ts +3 -1
- package/interface/contentTrackInterface.type.d.ts +1 -0
- package/interface/extension.type.d.ts +1 -1
- package/main/client/index.d.ts +17 -3
- package/main/plugin/customStream/index.d.ts +25 -0
- package/main/plugin/customStream/index.type.d.ts +97 -0
- package/main/plugin/customStream/processor.d.ts +386 -0
- package/main/plugin/module.d.ts +3 -0
- package/main/sensitiveMask/index.d.ts +18 -0
- package/main/server/index.d.ts +3 -2
- package/main/track/baseTrack.d.ts +12 -0
- package/main/track/contentTrack.d.ts +26 -1
- package/package.json +2 -2
- package/type/base.d.ts +3 -1
- package/type/client.d.ts +12 -0
- package/type/index.d.ts +1 -0
- package/type/sensitiveMask.d.ts +42 -0
- package/type/track.d.ts +14 -1
- package/xyrtc.js +4397 -5604
package/action/api.d.ts
CHANGED
|
@@ -311,9 +311,17 @@ declare class XYApi {
|
|
|
311
311
|
* 获取用户企业配置
|
|
312
312
|
*/
|
|
313
313
|
static getAccountConfig: APIUrlInfo;
|
|
314
|
+
/**
|
|
315
|
+
* 获取桌面客户端版本及下载地址
|
|
316
|
+
*/
|
|
317
|
+
static clientAppVersion: APIUrlInfo;
|
|
314
318
|
/**
|
|
315
319
|
* 重置密码
|
|
316
320
|
*/
|
|
317
321
|
static resetPassword: APIUrlInfo;
|
|
322
|
+
/**
|
|
323
|
+
* 敏感信息脱敏策略同步
|
|
324
|
+
*/
|
|
325
|
+
static sensitiveMaskPolicy: APIUrlInfo;
|
|
318
326
|
}
|
|
319
327
|
export default XYApi;
|
package/action/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as Action } from '.';
|
|
2
2
|
import { default as BaseAction } from './base';
|
|
3
|
-
import { IStateParams } from '../type/client';
|
|
3
|
+
import { IStateParams, XYClientAppVersion } from '../type/client';
|
|
4
4
|
declare class ConfigAction extends BaseAction {
|
|
5
5
|
private seqId;
|
|
6
6
|
private statesTime;
|
|
@@ -58,5 +58,12 @@ declare class ConfigAction extends BaseAction {
|
|
|
58
58
|
* @returns { number[] } abilityList - 服务端能力集
|
|
59
59
|
*/
|
|
60
60
|
getAbility(localAbilities?: number[]): Promise<any>;
|
|
61
|
+
/**
|
|
62
|
+
* 获取桌面客户端版本及下载地址
|
|
63
|
+
*
|
|
64
|
+
* @param { string } platform - 客户端平台,如 desktop_pc、desktop_mac
|
|
65
|
+
* @returns { Promise<XYClientAppVersion | null> } 版本信息
|
|
66
|
+
*/
|
|
67
|
+
getClientAppVersion(platform: string): Promise<XYClientAppVersion | null>;
|
|
61
68
|
}
|
|
62
69
|
export default ConfigAction;
|
package/action/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { default as MeetingAction } from './meeting';
|
|
|
7
7
|
import { default as EnterpriseAction } from './enterprise';
|
|
8
8
|
import { default as MeetingControlAction } from './control';
|
|
9
9
|
import { default as LogAction } from './log';
|
|
10
|
+
import { default as SensitiveMaskAction } from './sensitiveMask';
|
|
10
11
|
import { XYEmitter } from '@xylink/xy-toolkit';
|
|
11
12
|
import { XyEncryption } from '@xylink/xy-encryption';
|
|
12
13
|
export interface ICommonParams {
|
|
@@ -29,6 +30,7 @@ declare class Action extends XYEmitter<XYActionKey> {
|
|
|
29
30
|
private enterpriseAction;
|
|
30
31
|
private meetingControlAction;
|
|
31
32
|
private logAction;
|
|
33
|
+
private sensitiveMaskAction;
|
|
32
34
|
xyEncryption: XyEncryption;
|
|
33
35
|
private encryptedKey;
|
|
34
36
|
constructor(logger?: Logger);
|
|
@@ -45,6 +47,7 @@ declare class Action extends XYEmitter<XYActionKey> {
|
|
|
45
47
|
getMeetingControlAction(): MeetingControlAction;
|
|
46
48
|
getEnterpriseAction(): EnterpriseAction;
|
|
47
49
|
getLogAction(): LogAction;
|
|
50
|
+
getSensitiveMaskAction(): SensitiveMaskAction;
|
|
48
51
|
getHttpClient(): HttpClient;
|
|
49
52
|
getLogHttpClient(): HttpClient;
|
|
50
53
|
getRandomDeviceSN(): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as Action } from '.';
|
|
2
|
+
import { default as BaseAction } from './base';
|
|
3
|
+
import { MaskPolicy } from '../type/sensitiveMask';
|
|
4
|
+
declare class SensitiveMaskAction extends BaseAction {
|
|
5
|
+
constructor(action: Action);
|
|
6
|
+
/**
|
|
7
|
+
* 拉取脱敏策略
|
|
8
|
+
*
|
|
9
|
+
* @returns { Promise<MaskPolicy | null> } 返回 compiledRules 存在时的策略对象,否则 null
|
|
10
|
+
*/
|
|
11
|
+
fetchSensitiveMaskPolicy(): Promise<MaskPolicy | null>;
|
|
12
|
+
}
|
|
13
|
+
export default SensitiveMaskAction;
|
package/enum/index.d.ts
CHANGED
package/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { XYAiCopilotClient } from './feature/aiCopilot';
|
|
|
10
10
|
import { XYAudioPCMExtension } from './main/plugin/audioPCM/index';
|
|
11
11
|
import { XYAudioPCMProcessor } from './main/plugin/audioPCM/processor';
|
|
12
12
|
export * from './main/helper/index';
|
|
13
|
+
export * from './main/plugin/module';
|
|
13
14
|
export * from './export/tools';
|
|
14
15
|
/**
|
|
15
16
|
* XYLink WebRTC SDK 入口
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as VideoAudioTrack } from '../main/track/videoAudioTrack';
|
|
2
2
|
import { default as ContentTrack } from '../main/track/contentTrack';
|
|
3
|
-
import { AnalyserConfig, ClientInfoConfig, IConference, IConfMgmtUrl, ICustomMessageConfig, IFeatureConfig, IFeatureConfigKey, IFeatureConfigValue, IGetConferenceParams, ILoginExtAccount, ILoginWidthAuthCode, IMakeCall, IMode, InviteInfo, IReqInfo, IReturnResult, IRoster, IVideoAudioType, IVideoControlResult, IVideoProfile, Key, LayoutConfig, LayoutMode, LayoutOrientationType, LocalViewParams, LoginExtTokenParams, LoginTokenInfo, LoginVerifyCodeParams, LoginXYAccountParams, MEETING_DIRECTION, TCommand, TLocalLanguage, XYCheckNumberParams, XYClientEventKey, XYServerInfo, XYWebRxAudioStatus } from '../type/index';
|
|
3
|
+
import { AnalyserConfig, ClientInfoConfig, IConference, IConfMgmtUrl, ICustomMessageConfig, IFeatureConfig, IFeatureConfigKey, IFeatureConfigValue, IGetConferenceParams, ILoginExtAccount, ILoginWidthAuthCode, IMakeCall, IMode, InviteInfo, IReqInfo, IReturnResult, IRoster, IVideoAudioType, IVideoControlResult, IVideoProfile, Key, LayoutConfig, LayoutMode, LayoutOrientationType, LocalViewParams, LoginExtTokenParams, LoginTokenInfo, LoginVerifyCodeParams, LoginXYAccountParams, MEETING_DIRECTION, TCommand, TLocalLanguage, XYCheckNumberParams, XYClientAppVersion, XYClientEventKey, XYServerInfo, XYWebRxAudioStatus, MaskPolicy } from '../type/index';
|
|
4
4
|
import { AudioAnalyser } from '../tools/analyser';
|
|
5
5
|
import { XYEnterpriseInfo, XYSensitiveWords, XYUicustomization } from '../main/meeting/index.type';
|
|
6
6
|
import { CheckCaptchaImageParams, LoginOtherParams } from '../main/auth/index.type';
|
|
@@ -129,6 +129,8 @@ export interface XYClientIF {
|
|
|
129
129
|
* 其他
|
|
130
130
|
*/
|
|
131
131
|
checkSensitiveWord(displayName: string): Promise<XYSensitiveWords | null>;
|
|
132
|
+
getSensitiveMaskPolicy(): Promise<MaskPolicy>;
|
|
133
|
+
getClientAppVersion(platform: string): Promise<XYClientAppVersion | null>;
|
|
132
134
|
getCloudMeetingRooms(): Promise<any>;
|
|
133
135
|
getEnterpriseInfo(): Promise<XYEnterpriseInfo>;
|
|
134
136
|
getUicustomization(): Promise<XYUicustomization>;
|
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, XYTranscriptionApprovalParams, LayoutAvatar, TShowLanguage } 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, XYClientAppVersion, XYTranscriptionApprovalParams, LayoutAvatar, TShowLanguage, MaskPolicy } 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';
|
|
@@ -60,6 +60,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
60
60
|
private audioStatus;
|
|
61
61
|
private videoStatus;
|
|
62
62
|
private ability;
|
|
63
|
+
private sensitiveMaskManager;
|
|
63
64
|
private makeCallParams;
|
|
64
65
|
private resize;
|
|
65
66
|
private reconnectEntry;
|
|
@@ -732,7 +733,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
732
733
|
* 调用时机:加入会议成功后,由用户触发上下翻页操作
|
|
733
734
|
* 相关事件:page-info
|
|
734
735
|
* 关联内容:视频通话
|
|
735
|
-
* 使用限制:1、自动布局模式下适用;2、仅支持最多
|
|
736
|
+
* 使用限制:1、自动布局模式下适用;2、仅支持最多 112 路画面展示;3、单页最多 9 画面,最多 13 页;
|
|
736
737
|
*
|
|
737
738
|
* @param { number } currentPage - 请求某一页数据
|
|
738
739
|
*/
|
|
@@ -1036,7 +1037,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
1036
1037
|
* 调用时机:监听conf-change-info事件,当会中人员数量、状态变化时立即调用此方法进行请流操作,可频繁多次请求,请求完成后,通过layout事件响应结果数据
|
|
1037
1038
|
* 关联内容:拉流和布局
|
|
1038
1039
|
* 相关事件:conf-change-info、layout
|
|
1039
|
-
*
|
|
1040
|
+
* 使用限制:最多可查看 112 个参会者画面数据,单页最多 9 条、最多 13 页
|
|
1040
1041
|
* 注意事项:
|
|
1041
1042
|
* 1、从请流到展示画面,存在一定的延迟,需要考虑处理视频请求中状态
|
|
1042
1043
|
* 2、如果是指定终端模式请流,则pageIndex固定是0
|
|
@@ -1272,6 +1273,12 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
1272
1273
|
* @returns { AbilityResult} - 能力结果集
|
|
1273
1274
|
*/
|
|
1274
1275
|
getAbility(): AbilityResult;
|
|
1276
|
+
/**
|
|
1277
|
+
* 获取敏感信息脱敏策略
|
|
1278
|
+
*
|
|
1279
|
+
* @returns { Promise<MaskPolicy> } - 脱敏策略
|
|
1280
|
+
*/
|
|
1281
|
+
getSensitiveMaskPolicy(): Promise<MaskPolicy>;
|
|
1275
1282
|
/**
|
|
1276
1283
|
* 结束全体会议
|
|
1277
1284
|
* 使用场景:结束全体会议,方便整个会议结束
|
|
@@ -1311,6 +1318,13 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
|
|
|
1311
1318
|
* 获取个人云会议室信息
|
|
1312
1319
|
*/
|
|
1313
1320
|
getCloudMeetingRooms(): Promise<any>;
|
|
1321
|
+
/**
|
|
1322
|
+
* 获取桌面客户端版本及下载地址
|
|
1323
|
+
*
|
|
1324
|
+
* @param { string } platform - 客户端平台,如 desktop_pc、desktop_mac
|
|
1325
|
+
* @returns { Promise<XYClientAppVersion | null> } 版本信息
|
|
1326
|
+
*/
|
|
1327
|
+
getClientAppVersion(platform: string): Promise<XYClientAppVersion | null>;
|
|
1314
1328
|
/**
|
|
1315
1329
|
* 获取企业信息,包含企业信息配置title/icon、企业名称等
|
|
1316
1330
|
*
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { XYPluginIF } from '../../../interface/extension.type';
|
|
2
|
+
import { PluginType } from '../../../type/index';
|
|
3
|
+
import { XYCustomStreamOptions } from './index.type';
|
|
4
|
+
import { XYCustomStreamProcessor } from './processor';
|
|
5
|
+
/** 自定义视频流插件 */
|
|
6
|
+
export declare class XYCustomStreamExtension implements XYPluginIF<XYCustomStreamProcessor> {
|
|
7
|
+
private readonly version;
|
|
8
|
+
private readonly name;
|
|
9
|
+
private readonly processType;
|
|
10
|
+
private readonly processors;
|
|
11
|
+
constructor();
|
|
12
|
+
init(): void;
|
|
13
|
+
getVersion(): string;
|
|
14
|
+
getPluginType(): PluginType;
|
|
15
|
+
getPluginName(): string;
|
|
16
|
+
/** 当前环境是否至少支持一种 MediaStream 输出后端 */
|
|
17
|
+
isSupportExtension(): boolean;
|
|
18
|
+
/** 创建自定义流处理器 */
|
|
19
|
+
createProcessor(config?: XYCustomStreamOptions): XYCustomStreamProcessor | null;
|
|
20
|
+
/** 销毁插件创建的所有处理器 */
|
|
21
|
+
destroy(): void;
|
|
22
|
+
/** @internal */
|
|
23
|
+
removeProcessor(processor: XYCustomStreamProcessor): void;
|
|
24
|
+
}
|
|
25
|
+
export default XYCustomStreamExtension;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/** 自定义流输出后端 */
|
|
2
|
+
export type XYCustomStreamBackend = 'auto' | 'generator' | 'canvas';
|
|
3
|
+
/** 自定义流画面缩放模式 */
|
|
4
|
+
export type XYCustomStreamFit = 'contain' | 'cover' | 'fill';
|
|
5
|
+
/** 自定义流画面顺时针旋转角度 */
|
|
6
|
+
export type XYCustomStreamRotation = 0 | 90 | 180 | 270;
|
|
7
|
+
/** SDK支持的YUV420像素格式 */
|
|
8
|
+
export type XYCustomStreamYUVFormat = 'I420' | 'YV12' | 'NV12' | 'NV21';
|
|
9
|
+
/** YUV色彩矩阵 */
|
|
10
|
+
export type XYCustomStreamYUVColorMatrix = 'bt601' | 'bt709';
|
|
11
|
+
/** 自定义流处理器状态 */
|
|
12
|
+
export declare enum XYCustomStreamStatus {
|
|
13
|
+
INIT = "INIT",
|
|
14
|
+
ENABLED = "ENABLED",
|
|
15
|
+
PAUSED = "PAUSED",
|
|
16
|
+
DISABLED = "DISABLED",
|
|
17
|
+
DESTROYED = "DESTROYED"
|
|
18
|
+
}
|
|
19
|
+
/** 自定义流处理器配置 */
|
|
20
|
+
export interface XYCustomStreamOptions {
|
|
21
|
+
/** 旋转场景下的画面缩放模式,默认contain */
|
|
22
|
+
fit?: XYCustomStreamFit;
|
|
23
|
+
/** 画布背景色,默认黑色 */
|
|
24
|
+
backgroundColor?: string;
|
|
25
|
+
/** 输出后端,默认auto */
|
|
26
|
+
backend?: XYCustomStreamBackend;
|
|
27
|
+
/** 处理或输出异常回调 */
|
|
28
|
+
onError?: (error: unknown) => void;
|
|
29
|
+
}
|
|
30
|
+
/** 自定义流输入帧公共元数据 */
|
|
31
|
+
export interface XYCustomStreamFrameBase {
|
|
32
|
+
/** 输入帧宽度 */
|
|
33
|
+
width: number;
|
|
34
|
+
/** 输入帧高度 */
|
|
35
|
+
height: number;
|
|
36
|
+
/** 顺时针旋转角度,默认0 */
|
|
37
|
+
rotation?: XYCustomStreamRotation;
|
|
38
|
+
/** 可选帧时间戳,单位微秒;未传时由SDK生成 */
|
|
39
|
+
timestamp?: number;
|
|
40
|
+
}
|
|
41
|
+
/** JPEG输入帧 */
|
|
42
|
+
export interface XYCustomStreamJPEGFrame extends XYCustomStreamFrameBase {
|
|
43
|
+
type: 'jpeg';
|
|
44
|
+
/** 支持Base64/Data URL、Blob、ArrayBuffer和TypedArray */
|
|
45
|
+
data: string | Blob | ArrayBuffer | ArrayBufferView;
|
|
46
|
+
}
|
|
47
|
+
/** RGBA输入帧 */
|
|
48
|
+
export interface XYCustomStreamRGBAFrame extends XYCustomStreamFrameBase {
|
|
49
|
+
type: 'rgba';
|
|
50
|
+
data: ArrayBuffer | ArrayBufferView;
|
|
51
|
+
/** 单行字节数,默认width * 4 */
|
|
52
|
+
stride?: number;
|
|
53
|
+
/** RGBA数据起始偏移,默认0 */
|
|
54
|
+
offset?: number;
|
|
55
|
+
}
|
|
56
|
+
/** YUV420输入帧 */
|
|
57
|
+
export interface XYCustomStreamYUVFrame extends XYCustomStreamFrameBase {
|
|
58
|
+
type: 'yuv';
|
|
59
|
+
data: ArrayBuffer | ArrayBufferView;
|
|
60
|
+
format: XYCustomStreamYUVFormat;
|
|
61
|
+
/** 各Plane单行字节数,未传时按紧凑布局计算 */
|
|
62
|
+
strides?: number[];
|
|
63
|
+
/** 各Plane起始偏移,未传时按紧凑布局计算 */
|
|
64
|
+
offsets?: number[];
|
|
65
|
+
/** 色彩矩阵,默认bt601 */
|
|
66
|
+
colorMatrix?: XYCustomStreamYUVColorMatrix;
|
|
67
|
+
/** 是否使用Full Range,默认false */
|
|
68
|
+
fullRange?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/** 自定义流输入帧 */
|
|
71
|
+
export type XYCustomStreamFrame = XYCustomStreamJPEGFrame | XYCustomStreamRGBAFrame | XYCustomStreamYUVFrame;
|
|
72
|
+
/** 实际生效的输出后端,auto 会在创建时解析为 generator 或 canvas */
|
|
73
|
+
export type XYCustomStreamResolvedBackend = Exclude<XYCustomStreamBackend, 'auto'>;
|
|
74
|
+
/** @internal 解码后的临时绘制资源 */
|
|
75
|
+
export interface XYCustomStreamFrameResource {
|
|
76
|
+
source: CanvasImageSource;
|
|
77
|
+
dispose: () => void;
|
|
78
|
+
}
|
|
79
|
+
/** @internal YUV Plane 布局 */
|
|
80
|
+
export interface XYCustomStreamPlaneLayout {
|
|
81
|
+
offset: number;
|
|
82
|
+
stride: number;
|
|
83
|
+
}
|
|
84
|
+
/** @internal Chromium MediaStreamTrackGenerator 轨道 */
|
|
85
|
+
export interface XYCustomStreamTrackGenerator extends MediaStreamTrack {
|
|
86
|
+
writable: WritableStream<VideoFrame>;
|
|
87
|
+
}
|
|
88
|
+
/** @internal MediaStreamTrackGenerator 构造函数 */
|
|
89
|
+
export interface XYCustomStreamTrackGeneratorConstructor {
|
|
90
|
+
new (config: {
|
|
91
|
+
kind: 'video';
|
|
92
|
+
}): XYCustomStreamTrackGenerator;
|
|
93
|
+
}
|
|
94
|
+
/** @internal Canvas 捕获轨道,部分浏览器提供 requestFrame */
|
|
95
|
+
export interface XYCustomStreamCanvasCaptureTrack extends MediaStreamTrack {
|
|
96
|
+
requestFrame?: () => void;
|
|
97
|
+
}
|