@xylink/xy-rtc-sdk 4.0.6 → 4.0.7

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 (57) hide show
  1. package/README.md +4 -6
  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 +104 -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/polling.d.ts +9 -0
  14. package/feature/artboard/index.d.ts +1 -0
  15. package/feature/customMessage/index.d.ts +7 -0
  16. package/feature/electron/index.d.ts +25 -0
  17. package/feature/index.d.ts +4 -0
  18. package/interface/contentTrackInterface.type.d.ts +0 -1
  19. package/interface/event.type.d.ts +13 -0
  20. package/main/auth/index.d.ts +12 -1
  21. package/main/auth/index.type.d.ts +24 -0
  22. package/main/client/index.d.ts +44 -5
  23. package/main/layout/index.d.ts +1 -1
  24. package/main/layout/polling.d.ts +132 -10
  25. package/main/media/index.d.ts +4 -0
  26. package/main/media/index.type.d.ts +11 -1
  27. package/main/meeting/control.d.ts +19 -2
  28. package/main/meeting/index.d.ts +21 -4
  29. package/main/meeting/index.type.d.ts +25 -4
  30. package/main/quality/index.d.ts +17 -0
  31. package/main/render/videoManager.d.ts +6 -2
  32. package/main/roster/index.d.ts +7 -0
  33. package/main/server/index.d.ts +1 -0
  34. package/main/signal/index.type.d.ts +5 -0
  35. package/main/signal/reconnection.d.ts +46 -0
  36. package/main/socket/index.d.ts +2 -2
  37. package/main/track/baseTrack.d.ts +7 -4
  38. package/main/track/contentCapture.d.ts +59 -0
  39. package/main/track/contentTrack.d.ts +50 -38
  40. package/main/track/helper.d.ts +2 -11
  41. package/package.json +4 -4
  42. package/tools/aes.d.ts +33 -0
  43. package/tools/log/db.d.ts +1 -1
  44. package/tools/socket/socketManager.d.ts +1 -0
  45. package/tools/utils.d.ts +8 -0
  46. package/type/ability.d.ts +3 -1
  47. package/type/action.d.ts +2 -0
  48. package/type/base.d.ts +13 -0
  49. package/type/client.d.ts +36 -5
  50. package/type/index.d.ts +3 -0
  51. package/type/logger.d.ts +13 -1
  52. package/type/meeting.d.ts +7 -13
  53. package/type/polling.d.ts +12 -0
  54. package/type/socket.d.ts +2 -0
  55. package/type/stream.d.ts +38 -9
  56. package/type/track.d.ts +95 -6
  57. package/xyrtc.js +7767 -4551
@@ -1,6 +1,6 @@
1
1
  import { default as XYRTCClient } from '../client';
2
2
  import { Socket } from '../../tools/socket/socket';
3
- import { XYBaseModule } from '../../type/index';
3
+ import { TErrorReason, XYBaseModule } from '../../type/index';
4
4
  export declare class XYClientSocket implements XYBaseModule {
5
5
  private client;
6
6
  private logger;
@@ -60,7 +60,7 @@ export declare class XYClientSocket implements XYBaseModule {
60
60
  * @param { string } errorCode - 错误码
61
61
  * @param { TErrorReason } detail - 详情
62
62
  */
63
- private disconnectInWssError;
63
+ disconnectInWssError(errorCode: string, detail?: TErrorReason): void;
64
64
  /**
65
65
  * 结束会议,发送StopCall消息
66
66
  */
@@ -1,6 +1,6 @@
1
1
  import { default as Stream } from '../stream';
2
2
  import { default as Logger } from '../../tools/log/logger';
3
- import { CaptureStatus, IEnableStreamConfig, IReturnResult, IStreamChangeType, IStreamConfig, StreamKind, XYDeviceEventKey, XYTrackEventKey } from '../../type/index';
3
+ import { CaptureStatus, ContentTrackConfig, IEnableStreamConfig, IReturnResult, IStreamChangeType, IStreamConfig, StreamKind, XYDeviceEventKey, XYStreamParameterConfig, XYTrackEventKey } from '../../type/index';
4
4
  import { default as Peer } from '../peer/index';
5
5
  import { XYEmitter } from '@xylink/xy-toolkit';
6
6
  declare class BaseTrack extends XYEmitter<XYDeviceEventKey | XYTrackEventKey | string> {
@@ -67,12 +67,14 @@ declare class BaseTrack extends XYEmitter<XYDeviceEventKey | XYTrackEventKey | s
67
67
  /**
68
68
  * 获取Video可用的流配置
69
69
  *
70
+ * @param { IStreamConfig[] } streams - 流配置列表
70
71
  * @returns { IStreamConfig } - 可用的流配置
71
72
  */
72
73
  private getEnableVideoStreamConfig;
73
74
  /**
74
75
  * 获取Audio可用的流配置
75
76
  *
77
+ * @param { IStreamConfig[] } streams - 流配置列表
76
78
  * @returns { IStreamConfig } - 可用的流配置
77
79
  */
78
80
  private getEnableAudioStreamConfig;
@@ -81,7 +83,7 @@ declare class BaseTrack extends XYEmitter<XYDeviceEventKey | XYTrackEventKey | s
81
83
  *
82
84
  * @returns { IStreamConfig } - 可用的流配置
83
85
  */
84
- getEnableContentStreamConfig(): IStreamConfig | undefined;
86
+ getEnableContentStreamConfig(enableVideo: CaptureStatus, enableAudio: CaptureStatus): IEnableStreamConfig;
85
87
  /**
86
88
  * 初始化流配置
87
89
  */
@@ -101,7 +103,7 @@ declare class BaseTrack extends XYEmitter<XYDeviceEventKey | XYTrackEventKey | s
101
103
  /**
102
104
  * Create content senders config
103
105
  */
104
- initContentStreamsConfig(): void;
106
+ initContentStreamsConfig(config: ContentTrackConfig): void;
105
107
  private getIndexFromStreamChange;
106
108
  /**
107
109
  * 重置StreamConfig状态为默认状态
@@ -116,8 +118,9 @@ declare class BaseTrack extends XYEmitter<XYDeviceEventKey | XYTrackEventKey | s
116
118
  * @param { IStreamChangeType } body - StreamChange消息内容
117
119
  * @param { Peer } peer - Peer模块
118
120
  * @param { IStreamConfig[] } streams - Streams列表
121
+ * @param { XYStreamParameterConfig } config - 编码器配置参数
119
122
  */
120
- setStreamParameters(body: IStreamChangeType, peer: Peer, streams: IStreamConfig[]): Promise<void>;
123
+ setStreamParameters(body: IStreamChangeType, peer: Peer, streams: IStreamConfig[], config?: XYStreamParameterConfig): Promise<void>;
121
124
  /**
122
125
  * Close all media streams
123
126
  *
@@ -0,0 +1,59 @@
1
+ import { IEnabledCapture } from '../../type/index';
2
+ import { default as ContentTrack } from './contentTrack';
3
+ declare class ContentCapture {
4
+ private enabledCapture;
5
+ private track;
6
+ private logger;
7
+ constructor(track: ContentTrack);
8
+ getEnableCapture(): IEnabledCapture;
9
+ setEnableCapture(config: IEnabledCapture): void;
10
+ /**
11
+ * 初始化采集配置
12
+ *
13
+ * @param { boolean } muteAudio - 是否静音麦克风,true为静音麦克风,false是开启麦克风
14
+ * @param { boolean } muteVideo - 是否静音摄像头,true为关闭摄像头,false是开启摄像头
15
+ */
16
+ initCaptureConfig(muteAudio: boolean, muteVideo: boolean): void;
17
+ /**
18
+ * 根据可用的流配置,采集共享视频流
19
+ *
20
+ * @returns { Promise<MediaStream | IReturnResult> }
21
+ */
22
+ createContentMediaStream(): Promise<MediaStream>;
23
+ /**
24
+ * 采集桌面/应用流
25
+ *
26
+ * @param { MediaStreamConstraints | XYMediaStreamConstraints } constraints - 流约束配置
27
+ * @returns { MediaStream } - Content Stream
28
+ */
29
+ private getDisplayMediaStream;
30
+ /**
31
+ * 重新创建Content流
32
+ *
33
+ * @param { IReturnResult } error - 错误信息
34
+ * @returns { Promise<MediaStream> }
35
+ */
36
+ private reCreateContentMediaStream;
37
+ /**
38
+ * 获取约束设置
39
+ *
40
+ * @param { IStreamConfig } enableStreamConfig - 流配置
41
+ * @returns
42
+ */
43
+ private getContentConstraints;
44
+ /**
45
+ * 获取Content视频约束配置
46
+ *
47
+ * @param { IStreamConfig } videoConfig - 视频流配置
48
+ * @returns { any }
49
+ */
50
+ private getVideoConstraints;
51
+ /**
52
+ * 获取Content音频约束配置
53
+ *
54
+ * @param { IStreamConfig } audioConfig - 音频流配置
55
+ * @returns { any }
56
+ */
57
+ private getAudioConstraints;
58
+ }
59
+ export default ContentCapture;
@@ -1,4 +1,4 @@
1
- import { ContentTrackConfig, IReturnResult, XYElectronSource, IStreamChangeType, ShareContentStatus, TrackLibType, XYContentTrackIF, IVideoProcessTrack } from '../../type/index';
1
+ import { ContentTrackConfig, IReturnResult, IStreamChangeType, ShareContentStatus, TrackLibType, XYContentTrackIF, IVideoProcessTrack, XYDesktopCapturerOptions, XYDesktopCapturerSource, XYCacheStreamSetting } from '../../type/index';
2
2
  import { default as Stream } from '../stream';
3
3
  import { default as BaseTrack } from './baseTrack';
4
4
  import { default as Peer } from '../peer/index';
@@ -12,8 +12,13 @@ declare class ContentTrack extends BaseTrack implements XYContentTrackIF {
12
12
  private mediaStream;
13
13
  private processorMediaStream;
14
14
  private processorCount;
15
+ private electronSources;
16
+ private contentCapture;
17
+ private cacheStreamTrackSetting;
15
18
  constructor(streamInstance: Stream);
16
19
  getTrackType(): TrackLibType;
20
+ getBaseTrackConfig(): ContentTrackConfig;
21
+ getCacheStreamTrackSetting(): XYCacheStreamSetting | null;
17
22
  /**
18
23
  * 是否正在共享Content内容
19
24
  */
@@ -38,15 +43,17 @@ declare class ContentTrack extends BaseTrack implements XYContentTrackIF {
38
43
  *
39
44
  * @since v4.0.0
40
45
  * @param { ContentTrackConfig } config - 分享内容配置
41
- * @property { boolean } config.screenAudio - 可选,是否开启共享屏幕声音,默认是false,不共享
46
+ * @property { boolean } config.screenAudio - 可选,是否开启共享屏幕声音,默认是true,共享声音,设置为false代表不共享声音
42
47
  * @property { XYDisplaySurface } config.displaySurface - 可选,分享内容的类型,选择:browser(浏览器标签)、monitor(屏幕)、window(应用),默认是monitor屏幕
43
48
  * @property { boolean } config.preferCurrentTab - 可选,是否强制仅共享当前应用选项卡源,默认是false,不强制
44
49
  * @property { XYDisplaySwitch } config.monitorTypeSurfaces - 可选,共享屏幕时,选择是否排除“屏幕”源,默认是include,不排除,设置为exclude代表排除屏幕选项
45
50
  * @property { XYDisplaySwitch } config.selfBrowserSurface - 可选,共享屏幕时,选择是否排除当前应用选项卡,默认是include,不排除,设置为exclude代表排除当前应用选项卡
46
51
  * @property { XYDisplaySwitch } config.surfaceSwitching - 可选,共享屏幕时,选择是否允许浏览器标签之间提供控制器进行动态切换,默认是include,允许切换,设置为exclude代表不允许切换
47
- * @property { XYDisplaySwitch } config.systemAudio - 可选,共享屏幕时,是否允许开启采集系统源声音,默认是include,允许切换,设置为exclude代表不允许切换
48
52
  * @property { CaptureController } config.controller - 可选,共享屏幕时,指定CaptureController对象实例,可用于进一步操作捕获会话的行为,例如动态设置聚焦窗口行为
49
53
  * @property { XYCaptureHandleConfig } config.handleConfig - 可选,共享屏幕时,设置共享屏幕处理器配置
54
+ * @property { string } config.electronSourceId - 可选,Electron应用下共享屏幕时,指定采集源ID,默认是null,不指定,表现为随机分配一个屏幕进行分享
55
+ * @property { XYDegradationPreference } config.preference - 可选,共享屏幕时,设置共享屏幕的编码优先级,支持:maintain-framerate、maintain-resolution、balanced,默认是maintain-resolution,代表优先保持分辨率;maintain-framerate代表优先保持帧率,balanced代表平衡模式,优先保持分辨率,当帧率过低时,会降低分辨率;
56
+ * @property { StreamFrameRate } config.maxFrameRate - 可选,共享屏幕时,设置共享屏幕的最大帧率,默认是FR30,代表30帧,切换分享源时,沿用首次分享的配置,支持30/15/8帧率
50
57
  */
51
58
  capture(config?: ContentTrackConfig): Promise<IReturnResult>;
52
59
  /**
@@ -55,12 +62,29 @@ declare class ContentTrack extends BaseTrack implements XYContentTrackIF {
55
62
  * @returns { Promise<IReturnResult> } - 返回采集到的Stream流
56
63
  */
57
64
  private reselectStartCapture;
65
+ /**
66
+ * 更新Content音频轨道采集状态
67
+ * 使用场景:当视频共享切换时,检测是否需要采集音频,根据采集状态,更新音频轨道状态
68
+ */
69
+ private updateContentAudioTrackEnable;
58
70
  /**
59
71
  * 开始首次分享,采集共享画面
60
72
  *
61
73
  * @returns { Promise<IReturnResult> } - 返回采集到的Stream流
62
74
  */
63
75
  private startCapture;
76
+ /**
77
+ * 更新缓存流设置
78
+ * @param { MediaStream } mediaStream - 基础Content流
79
+ */
80
+ private updateCacheStreamTrackSetting;
81
+ /**
82
+ * 处理基础Content流
83
+ *
84
+ * @param { MediaStream } mediaStream - 基础Content流
85
+ * @returns { Promise<MediaStream> } - 处理后的Content流
86
+ */
87
+ private handleBaseContentStreamByProcessor;
64
88
  /**
65
89
  * 采集配置变动后,更新Content的分享模式
66
90
  */
@@ -77,12 +101,6 @@ declare class ContentTrack extends BaseTrack implements XYContentTrackIF {
77
101
  * @since v4.0.0
78
102
  */
79
103
  resume(): Promise<IReturnResult>;
80
- /**
81
- * 根据可用的流配置,采集共享视频流
82
- *
83
- * @returns { Promise<MediaStream | IReturnResult> }
84
- */
85
- private createContentMediaStream;
86
104
  /**
87
105
  * 创建下一个Content流
88
106
  *
@@ -91,34 +109,35 @@ declare class ContentTrack extends BaseTrack implements XYContentTrackIF {
91
109
  */
92
110
  private createNextContentStream;
93
111
  /**
94
- * 采集Electron桌面共享视频流
112
+ * 获取Electron采集源列表信息,业务上可以基于此数据让用户选择采集源
113
+ * 使用场景:Electron环境下,获取Electron采集源列表
114
+ * 调用时机:createContentTrack()完成之后
115
+ * 关联内容:https://openapi.xylink.com/common/meeting/doc/electron_guide?platform=web#h4kgw8yp6-9s42qu6j0yc0
95
116
  *
96
- * @param { string } selectedSourceId - 资源ID
97
- * @returns { MediaStream }
117
+ * @since 4.0.5
118
+ * @param { options } options - 屏幕源配置项
119
+ * @returns { Promise<XYDesktopCapturerSource[]> } - 采集源列表数据
98
120
  */
99
- createElectronBaseStream(selectedSourceId: string): Promise<MediaStream>;
121
+ getElectronContentSources(options?: XYDesktopCapturerOptions): Promise<XYDesktopCapturerSource[]>;
100
122
  /**
101
- * 获取Electron采集资源信息
102
- *
103
- * @param { desktopCapturer } desktopCapturer - 采集器
104
- * @param { string[] } types - 采集的类型:屏幕/应用等
105
- * @returns { Promise<XYElectronSource[] | any> }
106
- */
107
- getElectronContentSources(desktopCapturer: any, types?: any): Promise<XYElectronSource[] | any>;
108
- /**`
109
- * 创建Electron共享视频流
123
+ * 检查Electron屏幕采集权限
110
124
  *
111
- * @param { string } selectedSourceId - content stream source id
112
- * @returns { Promise<IStreamConfig[]> }
125
+ * @param { any } desktopCapturer - 采集器,支持通过Electron preload定义的desktopCapturer或者是Electron自带的desktopCapturer
126
+ * @returns { Promise<void> } - 返回采集源列表数据
113
127
  */
114
- createElectronContentStream(selectedSourceId: string): Promise<IReturnResult>;
128
+ private checkElectronScreenAccess;
115
129
  /**
116
- * 采集桌面/应用流
130
+ * 更新&合并Electron采集源
131
+ * 合并规则:
132
+ * 1. 当存在相同ID时,更新该源的数据内容(缩略图、名称等)
133
+ * 2. 当不存在相同ID时,根据源类型添加到不同位置:
134
+ * - screen类型: 添加到所有screen源的末尾
135
+ * - window类型: 添加到整个列表的末尾
136
+ * 3. 最后对比currentSources和sources,如果currentSources中存在sources中没有的源,则删除该源
117
137
  *
118
- * @param { MediaStreamConstraints } constraints - 流约束配置
119
- * @returns { MediaStream } - Content Stream
138
+ * @param { XYDesktopCapturerSource[] } sources - 采集源列表
120
139
  */
121
- private getDisplayMediaStream;
140
+ private updateElectronSources;
122
141
  /**
123
142
  * 监听ContentStream终止事件
124
143
  */
@@ -130,9 +149,9 @@ declare class ContentTrack extends BaseTrack implements XYContentTrackIF {
130
149
  */
131
150
  private onListenerStreamEnded;
132
151
  /**
133
- * Stream绑定结束监听事件,通知Client推送Content状态
152
+ * 申请发送Content内容,并开始检测Content分享状态
134
153
  */
135
- private contentStreamProcessor;
154
+ private startShareContentAndDetectTimeout;
136
155
  /**
137
156
  * 上报当前分享Content的进度状态
138
157
  */
@@ -155,13 +174,6 @@ declare class ContentTrack extends BaseTrack implements XYContentTrackIF {
155
174
  * 清理分享Content检测状态的倒计时器
156
175
  */
157
176
  clearShareContentTimer: () => void;
158
- /**
159
- * 获取约束设置
160
- *
161
- * @param { IStreamConfig } enableStreamConfig - 流配置
162
- * @returns
163
- */
164
- private getContentConstraints;
165
177
  /**
166
178
  * 媒体网关发给WEB JS的视频流的分辨率、带宽信息、帧率
167
179
  * WEB收到消息后推送相应视频流/调整带宽
@@ -1,9 +1,4 @@
1
- /**
2
- * Stream Constraints Helper Tools
3
- *
4
- * Created at : 2023-11-21 16:06:12
5
- * Last modified : 2025-03-20 16:59:44
6
- */
1
+ import { IReturnResult } from '../../type/base';
7
2
  export declare const ANALYSER_LOCAL_PREFIX = "LOCAL_PREFIX_";
8
3
  /**
9
4
  * 获取浏览器支持的约束配置字段
@@ -46,8 +41,4 @@ export declare const handleCreateMediaStreamError: (err: any) => {
46
41
  * @param { any } err - 错误信息
47
42
  * @returns { IReturnResult } 错误码
48
43
  */
49
- export declare const handleCreateContentStreamError: (err: any) => {
50
- code: string;
51
- msg: string;
52
- detail: string;
53
- };
44
+ export declare const handleCreateContentStreamError: (err: any) => IReturnResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylink/xy-rtc-sdk",
3
- "version": "4.0.6",
3
+ "version": "4.0.7",
4
4
  "author": "jinghui-Luo",
5
5
  "email": "luojinghui424@gmail.com",
6
6
  "bugs": {
@@ -21,7 +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.20",
24
25
  "@xylink/xy_api_gateway": "0.4.9-lite.6",
26
+ "@xylink/xy-toolkit": "^1.0.0",
25
27
  "axios": "^1.7.2",
26
28
  "clone-deep": "^4.0.1",
27
29
  "dexie": "^4.0.8",
@@ -36,8 +38,6 @@
36
38
  "terser": "^5.37.0",
37
39
  "uuid": "^10.0.0"
38
40
  },
39
- "dependencies": {
40
- "@xylink/xy-toolkit": "^0.1.0"
41
- },
41
+ "dependencies": {},
42
42
  "scripts": {}
43
43
  }
package/tools/aes.d.ts ADDED
@@ -0,0 +1,33 @@
1
+ import { default as CryptoJS } from 'crypto-js';
2
+ declare class XYAES {
3
+ /**
4
+ * 将字节数组转换为十六进制字符串
5
+ *
6
+ * @param { Uint8Array } bytes - 字节数组
7
+ * @returns { string } - 十六进制字符串
8
+ */
9
+ static bytesToHex(bytes: Uint8Array): string;
10
+ /**
11
+ * 获取 AES 初始化向量
12
+ *
13
+ * @returns { CryptoJS.WordArray } - 初始化向量
14
+ */
15
+ static getAESiv(): CryptoJS.lib.WordArray;
16
+ /**
17
+ * 使用 AES 加密
18
+ *
19
+ * @param { string } message - 要加密的消息
20
+ * @param { string } key - 加密密钥
21
+ * @returns { string } - 加密后的消息
22
+ */
23
+ static encryptByAES(message: string, key: string): string;
24
+ /**
25
+ * 使用 AES 解密
26
+ *
27
+ * @param { string } message - 要解密的消息
28
+ * @param { string } key - 解密密钥
29
+ * @returns { string } - 解密后的消息
30
+ */
31
+ static decryptByAES(message: string, key: string): string;
32
+ }
33
+ export default XYAES;
package/tools/log/db.d.ts CHANGED
@@ -72,7 +72,7 @@ export declare class DBManager {
72
72
  /**
73
73
  * 清空数据表数据
74
74
  */
75
- clearLimitTable(): Promise<void>;
75
+ clearLimitTable(): Promise<number>;
76
76
  /**
77
77
  * 清空数据表数据
78
78
  */
@@ -4,6 +4,7 @@ import { default as Logger } from '../log/logger';
4
4
  export declare class SocketManager {
5
5
  private sockets;
6
6
  constructor();
7
+ getSockets(): Map<string, Socket>;
7
8
  /**
8
9
  * 创建Socket实例并添加到SocketManager。
9
10
  *
package/tools/utils.d.ts CHANGED
@@ -39,3 +39,11 @@ export declare const clearBrackets: (str: string) => string;
39
39
  */
40
40
  declare function getCallerFunctionName(): string;
41
41
  export { getCallerFunctionName };
42
+ /**
43
+ * 获取随机数
44
+ *
45
+ * @param { number } min - 最小值
46
+ * @param { number } max - 最大值
47
+ * @returns 返回一个在[min,max]区间内的随机整数
48
+ */
49
+ export declare const getRandomNumber: (min: number, max: number) => number;
package/type/ability.d.ts CHANGED
@@ -5,12 +5,14 @@
5
5
  * @param { string } MEETING_SHARE_NEW_PAGE_API - 会议邀请漏洞修复使用新page API
6
6
  * @param { string } CHANGE_SEC_API - 终端录制接口整改为安全接口
7
7
  * @param { string } TRANSCRIPTION_API - 录制与转写分离,开启、关闭字幕使用新的接口
8
+ * @param { string } CK_NSH - 农商行定制化 - sdk自定义,非服务下发
8
9
  */
9
10
  export declare enum AbilityKey {
10
11
  USE_SEC_API = "use_sec_api",
11
12
  MEETING_SHARE_NEW_PAGE_API = "meeting_share_new_page_api",
12
13
  CHANGE_SEC_API = "hvv_240329",
13
- TRANSCRIPTION_API = "transcription_250627"
14
+ TRANSCRIPTION_API = "transcription_250627",
15
+ CK_NSH = "ck_nsh"
14
16
  }
15
17
  /**
16
18
  * 能力集
package/type/action.d.ts CHANGED
@@ -3,8 +3,10 @@
3
3
  *
4
4
  * @property { string | number } conferenceNumber - 云会议室号
5
5
  * @property { string } meetingId - 会议ID
6
+ * @property { string } customizedKey - 定制化参数
6
7
  */
7
8
  export interface IMeetingInviteParams {
8
9
  conferenceNumber: string | number;
9
10
  meetingId?: string;
11
+ customizedKey?: string;
10
12
  }
package/type/base.d.ts CHANGED
@@ -113,6 +113,7 @@ export interface XYLocatorServerInfo {
113
113
  * @property { string | number } errorCode - 可选,错误代码
114
114
  * @property { any } detail - 可选,自定义详情
115
115
  * @property { string } msg - 错误信息
116
+ * @property { string } doc - 可选,文档链接
116
117
  */
117
118
  export interface XYError {
118
119
  name?: string;
@@ -122,6 +123,7 @@ export interface XYError {
122
123
  errorCode?: string | number;
123
124
  detail?: any;
124
125
  msg?: string;
126
+ doc?: string;
125
127
  }
126
128
  /**
127
129
  * SDK版本信息
@@ -133,3 +135,14 @@ export interface XYVersion {
133
135
  version: string;
134
136
  createTime: string;
135
137
  }
138
+ /**
139
+ * 通用状态枚举
140
+ *
141
+ * @property { CLOSE } CLOSE - 关闭
142
+ * @property { OPEN } OPEN - 开启
143
+ */
144
+ export declare enum XYCommonState {
145
+ NONE = -1,
146
+ CLOSE = 0,
147
+ OPEN = 1
148
+ }
package/type/client.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import { IToken } from './base';
2
2
  import { IInternals, StreamFrameRate, StreamResolution, StreamResolutionLevel, VideoQuality } from './stream';
3
3
  import { SupportLocalLanguages } from '../enum/index';
4
- import { ConferenceProperties, ICloudRoomConfig, WatermarkRange, WatermarkStatus } from './meeting';
4
+ import { ICloudRoomConfig, WatermarkRange, WatermarkStatus } from './meeting';
5
5
  import { ContentTemplateMode, TemplateMode, ChairManReason } from './layout';
6
- import { ILayout, IRoster } from './index';
6
+ import { ILayout, IRoster, XYAccountConfig } from './index';
7
+ import { XYConferencePropertiesMessage } from '../main/meeting/index.type';
7
8
  /**
8
9
  * 向Client推送流类型
9
10
  *
@@ -213,6 +214,14 @@ export interface XYClientContainer {
213
214
  elementId?: string;
214
215
  offset?: number[];
215
216
  }
217
+ /**
218
+ * 客户端平台
219
+ *
220
+ * @property { boolean } isElectron - 是否是Electron端
221
+ */
222
+ export interface XYClientPlatform {
223
+ isElectron: boolean;
224
+ }
216
225
  /**
217
226
  * client配置参数
218
227
  *
@@ -226,7 +235,9 @@ export interface XYClientContainer {
226
235
  * @property { boolean } debug - 可选,是否接收所有参会者音视频状态数据,默认值是false,代表关闭调试模式
227
236
  * @property { boolean } checkSSL - 可选,是否需要检测SSL,默认值是true,代表启用检测SSL协议
228
237
  * @property { any[] } plugin - 可选,注册AI视频流插件,支持管道流方式多次接入
229
- * @property { boolean } isThird - 可选,忽略参数,默认是true
238
+ * @property { IRecallConfig } reCall - 可选,重呼配置
239
+ * @property { string? } customizedKey - 可选, 定制化参数
240
+ * @property { XYClientPlatform } platform - 可选,标识客户端平台
230
241
  */
231
242
  export interface IClientConfig {
232
243
  clientId: string;
@@ -235,11 +246,25 @@ export interface IClientConfig {
235
246
  server?: string;
236
247
  layout?: LayoutMode;
237
248
  container?: XYClientContainer;
238
- isThird?: boolean;
239
249
  isSupportHybridCloud?: boolean;
240
250
  debug?: boolean;
241
251
  checkSSL?: boolean;
242
252
  plugin?: any[];
253
+ reCall?: IRecallConfig;
254
+ customizedKey?: string;
255
+ platform?: XYClientPlatform;
256
+ }
257
+ /**
258
+ * 重呼配置
259
+ *
260
+ * @property { number } interval - 重呼间隔时间,单位:毫秒,默认 5000 ms
261
+ * @property { number } maxCount - 重呼最大次数,默认 3
262
+ * @property { number } wssMaxCount - wss最大重连次数,默认 5
263
+ */
264
+ export interface IRecallConfig {
265
+ interval?: number;
266
+ maxCount?: number;
267
+ wssMaxCount?: number;
243
268
  }
244
269
  export interface ILayoutParams {
245
270
  rosters: IRoster[];
@@ -311,6 +336,8 @@ export interface IDefault {
311
336
  * @property { string } extUserId - 第三方用户ID
312
337
  * @property { string } enterpriseId - 企业ID
313
338
  * @property { string } profilePicture - 账号头像
339
+ * @property { boolean } initPassword - 是否初始化密码
340
+ * @property { XYAccountConfig } accountConfig - 账号配置
314
341
  */
315
342
  export interface ILoginInfo {
316
343
  callUri?: string;
@@ -322,6 +349,8 @@ export interface ILoginInfo {
322
349
  extUserId?: string;
323
350
  enterpriseId?: string;
324
351
  profilePicture?: string;
352
+ initPassword?: boolean;
353
+ accountConfig?: XYAccountConfig;
325
354
  }
326
355
  export interface ICodeList {
327
356
  version: string;
@@ -503,7 +532,7 @@ export interface XYMeetingControl {
503
532
  * @property { string } mpvc - 点对点和多点的临时会议室号(多点是几个终端呼起来的,没有真正的会议室号),有些场景会控需要。
504
533
  * @property { XYMeetingControl } meetingControl - 会控信息
505
534
  */
506
- export interface IConferenceInfo extends Partial<ConferenceProperties> {
535
+ export interface IConferenceInfo extends XYConferencePropertiesMessage {
507
536
  callNumber?: string;
508
537
  callUrl?: string;
509
538
  deviceId?: string;
@@ -1037,6 +1066,7 @@ export interface IReceiveCustomMessage {
1037
1066
  * @property { boolean } enableWatermarkContent 是否启用获取content水印内容, 默认启用, 设置为true
1038
1067
  * @property { boolean } enableHideLocalView 是否启用隐藏本地画面模式,默认不启用,设置为false
1039
1068
  * @property { boolean } enableAudioPCM 是否启用音频PCM,默认不启用,设置为false
1069
+ * @property { boolean } enableReCall 是否支持重新呼叫, 默认启用, 设置为true
1040
1070
  */
1041
1071
  export interface IFeatureConfig {
1042
1072
  enableMeetingShout?: boolean;
@@ -1053,6 +1083,7 @@ export interface IFeatureConfig {
1053
1083
  enableWatermarkContent?: boolean;
1054
1084
  enableHideLocalView?: boolean;
1055
1085
  enableAudioPCM?: boolean;
1086
+ enableReCall?: boolean;
1056
1087
  }
1057
1088
  /**
1058
1089
  * SDK功能控制开关的key
package/type/index.d.ts CHANGED
@@ -24,6 +24,7 @@ export * from './socket';
24
24
  export * from './subtitle';
25
25
  export * from '../main/meeting/control.type';
26
26
  export * from '../main/meeting/verify.type';
27
+ export * from '../main/meeting/index.type';
27
28
  export * from '../main/server/index.type';
28
29
  export * from '../main/media/index.type';
29
30
  export * from '../main/media/index.type';
@@ -44,3 +45,5 @@ export * from '../feature/edu/index.type';
44
45
  export * from '../feature/speaker/index.type';
45
46
  export * from '../feature/query/index.type';
46
47
  export * from '../feature/artboard/index.type';
48
+ export * from '../feature/vep/index.type';
49
+ export * from '../enum/customizedkey';
package/type/logger.d.ts CHANGED
@@ -58,6 +58,16 @@ export declare enum LogLevel {
58
58
  * @param NONE - 禁用输出日志信息
59
59
  */
60
60
  export type TLogLevel = `${LogLevel}`;
61
+ /**
62
+ * 超出表的maxSize后,如何处理,支持清空当前table或者按照限制区间清理
63
+ *
64
+ * @param CLEAR_CURRENT_TABLE - 清空当前table
65
+ * @param CLEAR_LIMIT_TABLE - 按照限制区间清理
66
+ */
67
+ export declare enum XYOverflowClearType {
68
+ CLEAR_CURRENT_TABLE = "CLEAR_CURRENT_TABLE",
69
+ CLEAR_LIMIT_TABLE = "CLEAR_LIMIT_TABLE"
70
+ }
61
71
  /**
62
72
  * 日志模块配置
63
73
  *
@@ -68,13 +78,14 @@ export type TLogLevel = `${LogLevel}`;
68
78
  * @param { number } tableIndex - 可选,当前表的索引,默认值是1
69
79
  * @param { string } schema - 可选,表字段,默认值是'++id,t,c'
70
80
  * @param { number } maxSize - 可选,当前数据表最大存储长度,默认值是100000(10万条数据)
71
- * @param { number } detectTimer - 可选,多久检测一次表的最大长度,单位ms,默认值是300000(5分钟)
81
+ * @param { number } detectTimer - 可选,多久检测一次表的最大长度,单位ms,默认值是60000(1分钟)
72
82
  * @param { string[] } deleteDBNames - 可选,需要删除的历史数据库名,默认值是[]
73
83
  * @param { boolean } isUpdateVersion - 可选,是否需要更新表版本(历史表都将被删除,避免错误)
74
84
  * @param { boolean } enableClearTable - 可选,是否清理表, 默认值是true,代表重新初始化时清空当前数据表
75
85
  * @param { string } scope - 可选,配置日志Scope范围,例如配置为'APP',则所有日志显示为:[16:14:24 490][INFO][APP]xxxx
76
86
  * @param { number } clearOffset - 可选,自动清理表数据的偏移值,正序排序,默认值:1000,即从第1000位开始,1000+limit长度的数据进行自动清理操作
77
87
  * @param { number } clearLimit - 可选,自动清理表数据的数量限制,从offset开始,offset + limit长度为结束,默认值:11000
88
+ * @param { XYOverflowClearType } overflowClearType - 可选,超出表的maxSize后,如何处理,支持清空当前table或者按照限制区间清理,默认值:'CLEAR_CURRENT_TABLE'
78
89
  */
79
90
  export interface ILoggerConfig {
80
91
  dbName: string;
@@ -91,6 +102,7 @@ export interface ILoggerConfig {
91
102
  scope?: string;
92
103
  clearOffset?: number;
93
104
  clearLimit?: number;
105
+ overflowClearType?: XYOverflowClearType;
94
106
  }
95
107
  /**
96
108
  * 缓存数据表配置