@xylink/xy-rtc-sdk 4.0.0 → 4.0.2-beta.3

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 (168) hide show
  1. package/{README.MD → README.md} +1 -1
  2. package/action/ability.d.ts +151 -0
  3. package/action/api.d.ts +252 -0
  4. package/action/auth.d.ts +134 -0
  5. package/action/base.d.ts +13 -0
  6. package/action/config.d.ts +63 -0
  7. package/action/control.d.ts +101 -0
  8. package/action/enterprise.d.ts +66 -0
  9. package/{lib/tools/httpClient.d.ts → action/http.d.ts} +19 -11
  10. package/action/index.d.ts +92 -0
  11. package/action/index.type.d.ts +30 -0
  12. package/action/log.d.ts +17 -0
  13. package/action/meeting.d.ts +107 -0
  14. package/{lib/enum → enum}/client.d.ts +1 -6
  15. package/{lib/enum → enum}/constraints.d.ts +1 -6
  16. package/{lib/enum → enum}/device.d.ts +6 -0
  17. package/{lib/enum/errorCode.d.ts → enum/errorCode/common.d.ts} +1 -22
  18. package/enum/errorCode/index.d.ts +6 -0
  19. package/enum/errorCode/server.d.ts +10 -0
  20. package/enum/errorCode/signal.d.ts +15 -0
  21. package/{lib/enum → enum}/index.d.ts +11 -8
  22. package/enum/meeting.d.ts +15 -0
  23. package/{lib/enum → enum}/polling.d.ts +1 -0
  24. package/feature/artboard/index.d.ts +139 -0
  25. package/feature/artboard/index.type.d.ts +264 -0
  26. package/{lib/feature → feature}/customMessage/index.d.ts +3 -8
  27. package/{lib/feature → feature}/edu/index.d.ts +2 -1
  28. package/{lib/feature → feature}/edu/index.type.d.ts +1 -0
  29. package/feature/im/index.d.ts +89 -0
  30. package/feature/im/index.type.d.ts +30 -0
  31. package/feature/index.d.ts +29 -0
  32. package/feature/query/index.d.ts +36 -0
  33. package/feature/query/index.type.d.ts +61 -0
  34. package/{lib/feature → feature}/speaker/index.d.ts +5 -10
  35. package/{lib/feature → feature}/speaker/index.type.d.ts +1 -0
  36. package/{lib/index.d.ts → index.d.ts} +19 -21
  37. package/{lib/interface → interface}/clientInterface.type.d.ts +24 -11
  38. package/{lib/interface → interface}/contentTrackInterface.type.d.ts +1 -6
  39. package/{lib/interface → interface}/event.type.d.ts +60 -1
  40. package/{lib/interface → interface}/videoAudioTrackInterface.type.d.ts +2 -7
  41. package/{lib/main → main}/ability/const.d.ts +1 -0
  42. package/{lib/main → main}/ability/index.d.ts +5 -10
  43. package/main/auth/index.d.ts +160 -0
  44. package/main/auth/index.type.d.ts +63 -0
  45. package/main/client/clientBase.d.ts +60 -0
  46. package/main/client/clientState.d.ts +36 -0
  47. package/{lib/main/client.d.ts → main/client/index.d.ts} +253 -79
  48. package/main/client/index.type.d.ts +42 -0
  49. package/{lib/main → main}/device/index.d.ts +5 -15
  50. package/{lib/tools → main/helper}/i18n.d.ts +2 -1
  51. package/{lib/main → main}/helper/index.d.ts +9 -7
  52. package/{lib/main → main}/layout/index.d.ts +7 -16
  53. package/{lib/main → main}/layout/index.type.d.ts +10 -9
  54. package/{lib/main → main}/layout/polling.d.ts +3 -11
  55. package/{lib/main → main}/layout/state.d.ts +4 -10
  56. package/{lib/tools → main/layout}/template/index.d.ts +25 -7
  57. package/{lib/main/layout/template.d.ts → main/layout/template/manager.d.ts} +2 -1
  58. package/main/layout/template/mobile.d.ts +4 -0
  59. package/main/layout/template/polling.d.ts +3 -0
  60. package/{lib/main → main}/media/index.d.ts +13 -11
  61. package/{lib/main → main}/media/index.type.d.ts +1 -0
  62. package/{lib/main → main}/meeting/control.d.ts +20 -1
  63. package/{lib/main → main}/meeting/control.type.d.ts +1 -0
  64. package/{lib/main → main}/meeting/index.d.ts +39 -32
  65. package/main/meeting/index.type.d.ts +43 -0
  66. package/{lib/main → main}/meeting/verify.d.ts +2 -7
  67. package/{lib/main/peer.d.ts → main/peer/index.d.ts} +30 -25
  68. package/main/peer/index.type.d.ts +10 -0
  69. package/{lib/main → main}/plugin/index.d.ts +2 -7
  70. package/{lib/main → main}/quality/index.d.ts +1 -6
  71. package/{lib/main → main}/quality/quality.worker.d.ts +1 -4
  72. package/{lib/main → main}/quality/report.d.ts +2 -1
  73. package/{lib/main → main}/render/index.d.ts +4 -9
  74. package/{lib/main → main}/render/index.type.d.ts +2 -7
  75. package/{lib/main → main}/render/videoManager.d.ts +2 -7
  76. package/{lib/main → main}/roster/index.d.ts +9 -9
  77. package/{lib/main → main}/server/index.d.ts +73 -4
  78. package/main/server/index.type.d.ts +53 -0
  79. package/{lib/main → main}/signal/index.d.ts +2 -1
  80. package/{lib/main → main}/socket/index.d.ts +6 -12
  81. package/{lib/main → main}/stream/index.d.ts +17 -21
  82. package/{lib/main → main}/track/baseTrack.d.ts +6 -14
  83. package/{lib/main → main}/track/contentTrack.d.ts +4 -12
  84. package/main/track/customContentTrack.d.ts +10 -0
  85. package/main/track/customVideoAudioTrack.d.ts +10 -0
  86. package/{lib/main → main}/track/helper.d.ts +13 -1
  87. package/{lib/main → main}/track/videoAudioCapture.d.ts +2 -10
  88. package/{lib/main → main}/track/videoAudioTrack.d.ts +13 -15
  89. package/{lib/main → main}/vom/index.d.ts +2 -7
  90. package/package.json +26 -111
  91. package/{lib/tools/analyser.d.ts → tools/analyser/index.d.ts} +2 -9
  92. package/{lib/tools/analyserManager.d.ts → tools/analyser/manager.d.ts} +4 -13
  93. package/{lib/tools → tools}/config.d.ts +3 -10
  94. package/tools/data/list.d.ts +87 -0
  95. package/tools/data/map.d.ts +17 -0
  96. package/{lib/tools/detectBrowser/index.d.ts → tools/detector/browser.d.ts} +3 -3
  97. package/{lib/tools/detectTool → tools/detector}/index.d.ts +3 -7
  98. package/{lib/tools/detectStream/index.d.ts → tools/detector/stream.d.ts} +2 -9
  99. package/{lib/tools → tools}/emitter.d.ts +9 -3
  100. package/tools/frame/index.d.ts +36 -0
  101. package/tools/frame/index.type.d.ts +1 -0
  102. package/tools/index.d.ts +72 -0
  103. package/{lib/tools/dbManager.d.ts → tools/log/db.d.ts} +8 -14
  104. package/{lib/tools → tools}/log/logger.d.ts +6 -9
  105. package/tools/log/logger.worker.d.ts +10 -0
  106. package/{lib/tools → tools}/log/loggerManager.d.ts +3 -3
  107. package/tools/log/utils.d.ts +6 -0
  108. package/{lib/tools → tools}/pressure/index.d.ts +2 -9
  109. package/{lib/tools/promiseQueue.d.ts → tools/queue/async.d.ts} +3 -9
  110. package/tools/queue/queue.type.d.ts +10 -0
  111. package/{lib/tools/queue.d.ts → tools/queue/sync.d.ts} +3 -9
  112. package/{lib/tools → tools}/resize.d.ts +3 -4
  113. package/{lib/tools/snapshot.d.ts → tools/snapshot/index.d.ts} +3 -11
  114. package/tools/snapshot/index.type.d.ts +38 -0
  115. package/{lib/tools → tools/socket}/socket.d.ts +6 -10
  116. package/tools/socket/socketManager.d.ts +32 -0
  117. package/tools/store.d.ts +47 -0
  118. package/tools/utils.d.ts +162 -0
  119. package/{lib/tools → tools}/verify.d.ts +1 -1
  120. package/tools/window.d.ts +31 -0
  121. package/{lib/type → type}/ability.d.ts +3 -1
  122. package/{lib/type → type}/analyser.d.ts +1 -8
  123. package/{lib/type → type}/auth.d.ts +34 -0
  124. package/{lib/type → type}/base.d.ts +43 -11
  125. package/{lib/type → type}/capture.d.ts +1 -0
  126. package/{lib/type → type}/client.d.ts +65 -70
  127. package/{lib/type → type}/index.d.ts +5 -3
  128. package/{lib/type → type}/layout.d.ts +15 -1
  129. package/{lib/type → type}/logger.d.ts +1 -6
  130. package/{lib/type → type}/meeting.d.ts +105 -15
  131. package/{lib/type → type}/quality.d.ts +2 -7
  132. package/{lib/type → type}/stream.d.ts +4 -5
  133. package/{lib/type → type}/track.d.ts +1 -9
  134. package/xyrtc.js +23212 -0
  135. package/lib/action/index.d.ts +0 -415
  136. package/lib/enum/meeting.d.ts +0 -4
  137. package/lib/feature/index.d.ts +0 -3
  138. package/lib/main/auth/index.d.ts +0 -101
  139. package/lib/main/clientBase.d.ts +0 -40
  140. package/lib/main/clientState.d.ts +0 -56
  141. package/lib/main/server/index.type.d.ts +0 -21
  142. package/lib/main/track/customContentTrack.d.ts +0 -18
  143. package/lib/main/track/customVideoAudioTrack.d.ts +0 -18
  144. package/lib/tools/enum.d.ts +0 -6
  145. package/lib/tools/index.d.ts +0 -8
  146. package/lib/tools/log/logger.worker.d.ts +0 -13
  147. package/lib/tools/regex.d.ts +0 -4
  148. package/lib/tools/store.d.ts +0 -15
  149. package/lib/tools/template/mobile.d.ts +0 -9
  150. package/lib/tools/template/polling.d.ts +0 -8
  151. package/lib/tools/utils.d.ts +0 -97
  152. package/lib/xyrtc.cjs.js +0 -1
  153. package/lib/xyrtc.umd.js +0 -1
  154. /package/{lib/enum → enum}/analyser.d.ts +0 -0
  155. /package/{lib/enum → enum}/i18n.d.ts +0 -0
  156. /package/{lib/interface → interface}/baseModule.type.d.ts +0 -0
  157. /package/{lib/main → main}/device/index.type.d.ts +0 -0
  158. /package/{lib/main → main}/helper/index.type.d.ts +0 -0
  159. /package/{lib/main → main}/meeting/verify.type.d.ts +0 -0
  160. /package/{lib/main → main}/render/videoManager.type.d.ts +0 -0
  161. /package/{lib/main → main}/vom/index.type.d.ts +0 -0
  162. /package/{lib/tools/detectTool → tools/detector}/index.type.d.ts +0 -0
  163. /package/{lib/tools/detectStream/index.type.d.ts → tools/detector/stream.type.d.ts} +0 -0
  164. /package/{lib/tools → tools}/pressure/index.type.d.ts +0 -0
  165. /package/{lib/type → type}/action.d.ts +0 -0
  166. /package/{lib/type → type}/peer.d.ts +0 -0
  167. /package/{lib/type → type}/polling.d.ts +0 -0
  168. /package/{lib/type → type}/socket.d.ts +0 -0
@@ -1,13 +1,8 @@
1
- /**
2
- * Feature:实时讲话人功能
3
- *
4
- * Created at : 2023-09-26 15:12:40
5
- * Last modified : 2024-06-28 18:28:26
6
- */
1
+ import { default as Logger } from '../../tools/log/logger';
2
+ import { default as XYRTCClient } from '../../main/client';
7
3
  import { SpeakersInfoItem, XYBaseModule } from '../../type/index';
8
- import Client from '../../main/client';
9
- import Logger from '../../tools/log/logger';
10
- export declare class Speaker implements XYBaseModule {
4
+
5
+ export declare class XYSpeaker implements XYBaseModule {
11
6
  logger: Logger;
12
7
  private client;
13
8
  private cacheSpeakerList;
@@ -17,7 +12,7 @@ export declare class Speaker implements XYBaseModule {
17
12
  private speakerInterval;
18
13
  private speakerTimestamp;
19
14
  private analyserMap;
20
- constructor(client: Client);
15
+ constructor(client: XYRTCClient);
21
16
  /**
22
17
  * 获取实时讲话人列表数据
23
18
  */
@@ -1,4 +1,5 @@
1
1
  import { AnalyserNode } from '../../type/index';
2
+
2
3
  /**
3
4
  * 实时讲话人内部数据
4
5
  */
@@ -1,20 +1,12 @@
1
- /**
2
- * XYLink WebRTC SDK Lib
3
- *
4
- * @authors Luo-jinghui (luojinghui424@gmail.com)
5
- * @date 2019-10-14 18:20:28
6
- */
7
- import XYRTCClient from './main/client';
8
- import Logger from './tools/log/logger';
9
- import LogManager from './tools/log/loggerManager';
10
- import ContentTrack from './main/track/contentTrack';
11
- import VideoAudioTrack from './main/track/videoAudioTrack';
12
- import { IClientConfig, TLocale } from './type/index';
13
- import { ICheckSystemRequirements } from './tools/detectTool/index.type';
14
- import { XYDetector } from './tools/detectTool';
15
- export { AudioAnalyser } from './tools/analyser';
16
- export { XYStreamDetector } from './tools/detectStream';
1
+ import { XYIMClient } from './feature/im';
2
+ import { IClientConfig, TLocale, XYVersion } from './type/index';
3
+ import { Logger, ICheckSystemRequirements } from './tools/index';
4
+ import { default as VideoAudioTrack } from './main/track/videoAudioTrack';
5
+ import { default as ContentTrack } from './main/track/contentTrack';
6
+ import { default as XYRTCClient } from './main/client';
7
+
17
8
  export * from './main/helper/index';
9
+ export * from './tools/index';
18
10
  /**
19
11
  * XYLink WebRTC SDK 入口
20
12
  */
@@ -23,6 +15,12 @@ export default class XYRTC {
23
15
  * 小鱼易连Web SDK的版本和构建时间
24
16
  */
25
17
  static version: string;
18
+ /**
19
+ * 获取小鱼易连Web SDK的版本和构建时间信息
20
+ *
21
+ * @returns { XYVersion } - 包含版本号和构建时间的对象
22
+ */
23
+ static getVersion(): XYVersion;
26
24
  /**
27
25
  * SDK内部的日志模块
28
26
  */
@@ -30,9 +28,9 @@ export default class XYRTC {
30
28
  /**
31
29
  * 日志管理器,可以同时获取多个日志实例内容
32
30
  */
33
- static logManager: LogManager;
31
+ static logManager: import('./tools/index').LogManager;
34
32
  /**
35
- * 创建会议客户端XYRTCClient模,提供实时音视频通话框架能力,一次会议创建一次即可
33
+ * 创建会议客户端XYRTCClient模块,提供实时音视频通话框架能力,一次会议创建一次即可
36
34
  * 使用场景:1、创建多人会议客户端;2、实现会中和会外设备设置、会前预览画面等功能
37
35
  * 调用时机:初始化SDK时
38
36
  *
@@ -52,7 +50,7 @@ export default class XYRTC {
52
50
  * @param { ILoggerConfig } config - 日志模块配置
53
51
  * @returns { Logger } - 日志库
54
52
  */
55
- static createLogger: (config: import("./type/index").ILoggerConfig) => Logger;
53
+ static createLogger: (config: import('./type/index').ILoggerConfig) => Logger;
56
54
  /**
57
55
  * 设置Web SDK国际化语言
58
56
  * 使用场景:如果项目支持国际化,可在语言变化时,调用此方法
@@ -83,7 +81,7 @@ export default class XYRTC {
83
81
  /**
84
82
  * 导出 MODULES
85
83
  */
86
- export { XYRTCClient, VideoAudioTrack, ContentTrack, Logger, LogManager, XYDetector };
84
+ export { XYRTCClient, VideoAudioTrack, ContentTrack, XYIMClient };
87
85
  /**
88
86
  * 导出 TYPE 类型定义
89
87
  */
@@ -91,4 +89,4 @@ export * from './type/index';
91
89
  /**
92
90
  * 导出错误码
93
91
  */
94
- export { ERROR_CODE } from './enum/errorCode';
92
+ export { ERROR_CODE } from './enum/errorCode/server';
@@ -1,13 +1,11 @@
1
- /**
2
- * XYLink WebRTC SDK Interface
3
- *
4
- * Created at : 2024-04-22 16:01:57
5
- * Last modified : 2024-07-10 11:34:03
6
- */
7
- import VideoAudioTrack from '../main/track/videoAudioTrack';
8
- import ContentTrack from '../main/track/contentTrack';
9
- import { AnalyserConfig, IConference, IConfMgmtUrl, ICustomMessageConfig, IFeatureConfig, IFeatureConfigKey, IFeatureConfigValue, IGetConferenceParams, ILoginExtAccount, ILoginWidthAuthCode, IMakeCall, IMode, InviteInfo, IReqInfo, IReturnResult, IRoster, IVideoAudioType, IVideoControlResult, IVideoProfile, Key, LayoutConfig, LayoutOrientationType, LocalViewParams, LoginExtTokenParams, LoginTokenInfo, LoginXYAccountParams, MEETING_DIRECTION, SnapshotParams, SnapshotResult, TCommand, TLocalLanguage, XYCheckNumberParams, XYClientEventKey, XYServerInfo } from '../type/index';
1
+ import { CheckCaptchaImageParams, LoginOtherParams } from '../main/auth/index.type';
2
+ import { XYEnterpriseInfo, XYSensitiveWords, XYUicustomization } from '../main/meeting/index.type';
10
3
  import { AudioAnalyser } from '../tools/analyser';
4
+ import { SnapshotParams, SnapshotResult } from '../tools/index';
5
+ 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';
6
+ import { default as ContentTrack } from '../main/track/contentTrack';
7
+ import { default as VideoAudioTrack } from '../main/track/videoAudioTrack';
8
+
11
9
  export interface XYClientIF {
12
10
  /**
13
11
  * 初始化
@@ -17,11 +15,18 @@ export interface XYClientIF {
17
15
  /**
18
16
  * 登录
19
17
  */
20
- loginXYlinkAccount(userName: string, password: string): Promise<IReturnResult>;
18
+ checkCaptchaImage(data: CheckCaptchaImageParams): Promise<{
19
+ success: boolean;
20
+ }>;
21
+ getCaptchaImage(): Promise<IReturnResult>;
22
+ getVerificationCode(phone: string): Promise<IReturnResult>;
21
23
  loginExternalAccount(params: ILoginExtAccount): Promise<IReturnResult>;
22
- loginXYAccount(params: LoginXYAccountParams): Promise<IReturnResult>;
23
24
  loginExtToken(params: LoginExtTokenParams): Promise<IReturnResult>;
24
25
  loginWithAuthCode(params: ILoginWidthAuthCode): Promise<IReturnResult>;
26
+ loginXYAccount(params: LoginXYAccountParams): Promise<IReturnResult>;
27
+ loginXYlinkAccount(userName: string, password: string, params?: LoginOtherParams): Promise<IReturnResult>;
28
+ loginXYLinkByVerifyCode(params: LoginVerifyCodeParams): Promise<IReturnResult>;
29
+ logout(): Promise<void>;
25
30
  setLoginTokenInfo(info: LoginTokenInfo): Promise<IReturnResult>;
26
31
  /**
27
32
  * 呼叫
@@ -47,6 +52,7 @@ export interface XYClientIF {
47
52
  removeAudioAnalyser(id?: string): void | IReturnResult;
48
53
  setTranslationLanguage(language: TLocalLanguage): Promise<IReturnResult>;
49
54
  setVideoProfile(direction: MEETING_DIRECTION, profile: IVideoProfile): Promise<void>;
55
+ setWebRxAudioStatus(params: XYWebRxAudioStatus): void;
50
56
  startTranslation(): Promise<IReturnResult>;
51
57
  stopTranslation(): Promise<IReturnResult>;
52
58
  subscribeBulkRoster(): Promise<IReturnResult>;
@@ -70,6 +76,7 @@ export interface XYClientIF {
70
76
  setAudioRenderer(streamId: string, ele: HTMLAudioElement): Promise<void>;
71
77
  switchLayout(templateMode?: IMode): Promise<IMode>;
72
78
  setLayoutConfig(config: LayoutConfig): void;
79
+ setLayoutMode(mode: LayoutMode): void;
73
80
  setLayoutOrientation(orientation: LayoutOrientationType): Promise<IReturnResult>;
74
81
  setHideLocalView(state: boolean): Promise<{
75
82
  status: boolean;
@@ -117,11 +124,17 @@ export interface XYClientIF {
117
124
  * 挂断会议
118
125
  */
119
126
  destroy(reason?: string, blockSendSocket?: boolean): Promise<boolean>;
127
+ hangup(reason?: string, blockSendSocket?: boolean): Promise<boolean>;
120
128
  off(key: string): void;
121
129
  /**
122
130
  * 其他
123
131
  */
132
+ checkSensitiveWord(displayName: string): Promise<XYSensitiveWords | null>;
133
+ getCloudMeetingRooms(): Promise<any>;
134
+ getEnterpriseInfo(): Promise<XYEnterpriseInfo>;
135
+ getUicustomization(): Promise<XYUicustomization>;
124
136
  sendCustomMessage(config: ICustomMessageConfig): IReturnResult;
137
+ setClientInfo(info: ClientInfoConfig): void;
125
138
  setServerAddress(serverInfo: XYServerInfo): void;
126
139
  switchDebug(status: boolean): Promise<boolean>;
127
140
  switchFeatureConfig(key: IFeatureConfigKey, value: IFeatureConfigValue<IFeatureConfigKey>): Promise<IReturnResult>;
@@ -1,10 +1,5 @@
1
- /**
2
- * XYLink WebRTC SDK Custom Track Interface
3
- *
4
- * Created at : 2024-04-22 16:01:57
5
- * Last modified : 2024-06-20 16:31:52
6
- */
7
1
  import { ContentTrackConfig, IReturnResult, XYElectronSource } from '../type/index';
2
+
8
3
  export interface XYContentTrackIF {
9
4
  capture(config?: ContentTrackConfig): Promise<IReturnResult>;
10
5
  close(): void;
@@ -2,7 +2,7 @@
2
2
  * XY WebRTC SDK Event Keys
3
3
  *
4
4
  * Created at : 2024-06-07 11:00:49
5
- * Last modified : 2024-06-07 18:55:00
5
+ * Last modified : 2024-12-23 14:35:42
6
6
  */
7
7
  /**
8
8
  * SDK客户端事件Key枚举
@@ -318,6 +318,39 @@ export declare enum XYClientEventKey {
318
318
  * 使用限制:需要开通云会议室设置和会控录制权限开关
319
319
  */
320
320
  RECORD_PERMISSION = "record-permission",
321
+ /**
322
+ * ==================分组:白板/批注==================
323
+ */
324
+ /**
325
+ * 白板状态变更事件
326
+ * 关联内容:高级功能-白板
327
+ * 相关方法:调用startWhiteboard开始分享白板
328
+ */
329
+ WHITEBOARD_STATE_CHANGED = "whiteboard-state-changed",
330
+ /**
331
+ * 批注状态变更事件
332
+ * 关联内容:高级功能-批注
333
+ * 相关方法:调用startAnnotation开始分享批注
334
+ * 使用限制:仅支持在接收分享内容下启用批注功能
335
+ */
336
+ ANNOTATION_STATE_CHANGED = "annotation-state-changed",
337
+ /**
338
+ * 白板状态变更事件
339
+ * 关联内容:高级功能-白板
340
+ * 相关方法:调用startWhiteboard开始分享白板
341
+ */
342
+ WHITEBOARD_CONNECTED = "whiteboard-connected",
343
+ /**
344
+ * 白板绘制数据
345
+ * 关联内容:高级功能-白板
346
+ * 相关方法:调用startWhiteboard开始分享白板
347
+ */
348
+ WHITEBOARD_DATA_CHANGED = "whiteboard-data-changed",
349
+ /**
350
+ * 共享内容原始尺寸
351
+ * 关联内容:高级功能-白板
352
+ */
353
+ ORI_VIDEO_SIZE = "origin-video-size",
321
354
  /**
322
355
  * ==================分组:其他==================
323
356
  */
@@ -348,6 +381,10 @@ export declare enum XYClientEventKey {
348
381
  * 相关内容:​​Chrome自动播放政策​​、​​IOS自动播放策略​​、​​火狐自动播放策略​​
349
382
  */
350
383
  PLAY_FAILED = "play-failed",
384
+ /**
385
+ * 登录状态变更事件
386
+ */
387
+ LOGIN_STATE = "login-state",
351
388
  /**
352
389
  * Socket关闭事件,不需要对外
353
390
  */
@@ -442,3 +479,25 @@ export declare enum XYSocketEventKey {
442
479
  */
443
480
  TOKEN_INVALID = "TOKEN_INVALID"
444
481
  }
482
+ /**
483
+ * IM事件
484
+ */
485
+ export declare enum XYIMEventKey {
486
+ /**
487
+ * IM消息
488
+ */
489
+ IM_MSG = "xy-im-msg",
490
+ /**
491
+ * IM输入框聚焦
492
+ */
493
+ XY_INPUT_FOCUS = "xy-input_focus"
494
+ }
495
+ /**
496
+ * Action事件
497
+ */
498
+ export declare enum XYActionKey {
499
+ /**
500
+ * Token信息
501
+ */
502
+ TOKEN = "token"
503
+ }
@@ -1,11 +1,6 @@
1
- /**
2
- * XYLink WebRTC SDK Custom Track Interface
3
- *
4
- * Created at : 2024-04-22 16:01:57
5
- * Last modified : 2024-06-20 16:31:52
6
- */
7
- import VideoAudioTrack from '../main/track/videoAudioTrack';
8
1
  import { DEVICE_KIND, IFacingMode, IProcessTrack, IReturnResult, PeopleTrackConfig, SwitchDeviceConfig } from '../type/index';
2
+ import { default as VideoAudioTrack } from '../main/track/videoAudioTrack';
3
+
9
4
  export interface XYVideoAudioTrackIF {
10
5
  capture(config?: PeopleTrackConfig): Promise<any>;
11
6
  close(): void;
@@ -1,4 +1,5 @@
1
1
  import { LocalAbility } from '../../type/index';
2
+
2
3
  /**
3
4
  * 本地能力集
4
5
  */
@@ -1,18 +1,13 @@
1
- /**
2
- * 能力集
3
- *
4
- * Created at : 2024-05-13 14:47:25
5
- * Last modified : 2024-05-13 14:47:25
6
- */
1
+ import { default as XYRTCClient } from '../client';
7
2
  import { AbilityResult } from '../../type/index';
8
- import Client from '../client';
3
+
9
4
  declare class Ability {
10
5
  private abilityResult;
11
6
  private logger;
12
7
  private action;
13
- constructor(client: Client);
8
+ constructor(client: XYRTCClient);
14
9
  static instance: Ability | null;
15
- static createInstance(client: Client): Ability;
10
+ static createInstance(client: XYRTCClient): Ability;
16
11
  /**
17
12
  * 获取终端和服务端接口是否可用的能力集
18
13
  *
@@ -25,7 +20,7 @@ declare class Ability {
25
20
  *
26
21
  * @returns { Promise<AbilityResult> } - 能力结果集
27
22
  */
28
- private fetchAbilityInfo;
23
+ fetchAbilityInfo(): Promise<AbilityResult>;
29
24
  /**
30
25
  * 根据十进制数值计算能力集
31
26
  *
@@ -0,0 +1,160 @@
1
+ import { CheckCaptchaImageParams, LoginOtherParams, XYLoginState } from './index.type';
2
+ import { default as XYRTCClient } from '../client';
3
+ import { ILoginExtAccount, ISdkUserInfo, ILoginInfo, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, LoginTokenInfo, IReturnResult, LoginThirdAuthTokenParams, LoginVerifyCodeParams } from '../../type/index';
4
+
5
+ declare class Auth {
6
+ private client;
7
+ private logger;
8
+ private action;
9
+ private authAction;
10
+ private loginInfo;
11
+ private extId;
12
+ private loginState;
13
+ private rid;
14
+ constructor(client: XYRTCClient);
15
+ getLoginState(): XYLoginState;
16
+ getLoginInfo(): ILoginInfo;
17
+ setLoginInfo(loginInfo: ILoginInfo): void;
18
+ destroy(): void;
19
+ /**
20
+ * 登录时,重置状态
21
+ */
22
+ private preLoginTasks;
23
+ /**
24
+ * 上报登录状态
25
+ * 使用场景:该事件用于监听登录状态的变化,包括用户的登录状态、用户信息以及 token 刷新信息等。当登录状态发生变化时,系统会触发此事件并传递相关数据
26
+ *
27
+ *
28
+ * @param { XYLoginStateData } data - 登录状态
29
+ */
30
+ private emitLoginState;
31
+ /**
32
+ * 第三方账号登录 - 旧方法
33
+ *
34
+ * @public
35
+ * @param { ILoginExtAccount } params 参数
36
+ * @param { string } params.displayName - 必填,用户名称
37
+ * @param { string? } params.extUserId - 可选,三方用户ID
38
+ * @param { boolean? } params.tempUser - 可选,是否是临时账号 v3.9.2新增
39
+ * @return { Promise<IReturnResult> } - 返回结果
40
+ */
41
+ loginExternalAccount(params: ILoginExtAccount): Promise<IReturnResult>;
42
+ /**
43
+ * 授权码登录
44
+ *
45
+ * @param { ILoginWidthAuthCode } params 参数
46
+ * @param {string} params.extID 企业id
47
+ * @param {string} params.extUserId 用户id
48
+ * @param {string} params.displayName 用户名称
49
+ * @param {string} params.oauthCode 授权码
50
+ * @param {boolean} params.isTempUser 是否临时账户
51
+ * @param {string} params.channelId 渠道id
52
+ * @return { Promise<IReturnResult> } - 返回结果
53
+ */
54
+ loginWithAuthCode(params: ILoginWidthAuthCode): Promise<IReturnResult>;
55
+ /**
56
+ * 小鱼账号登录
57
+ *
58
+ * @param { ISdkUserInfo } sdkUserInfo
59
+ * @param { LoginOtherParams } params
60
+ * @return { Promise<IReturnResult> } - 返回结果
61
+ */
62
+ login(sdkUserInfo: ISdkUserInfo, params?: LoginOtherParams): Promise<IReturnResult>;
63
+ /**
64
+ * 三方用户统一认证-小鱼账号登录
65
+ *
66
+ * @param { LoginXYAccountParams } params 参数
67
+ * @return { Promise<IReturnResult> } - 返回结果
68
+ */
69
+ loginXYAccount(params: LoginXYAccountParams): Promise<IReturnResult>;
70
+ /**
71
+ * 三方用户统一认证-三方id登录
72
+ *
73
+ * @param { ILoginExtAccount } params 参数
74
+ * @return { Promise<IReturnResult> } - 返回结果
75
+ */
76
+ loginExtUserId(params: ILoginExtAccount): Promise<IReturnResult>;
77
+ /**
78
+ * 三方用户统一认证-token登录
79
+ *
80
+ * @param { LoginExtTokenParams } params 参数
81
+ * @return { Promise<IReturnResult> } - 返回结果
82
+ */
83
+ loginExtToken(params: LoginExtTokenParams): Promise<IReturnResult>;
84
+ /**
85
+ * 无登录模式调用,需要在调用makeCall前配置,用于网关签名计算和接口安全校验
86
+ *
87
+ * @param { LoginTokenInfo } info - 登录token、clientId等相关信息
88
+ */
89
+ setLoginTokenInfo(info: LoginTokenInfo): Promise<IReturnResult>;
90
+ /**
91
+ * 根据Token获取用户信息
92
+ *
93
+ * @param { string } token - token信息
94
+ * @returns { Promise<IReturnResult> } - 结果
95
+ */
96
+ private getUserInfo;
97
+ /**
98
+ * 统一处理登录后的信息
99
+ *
100
+ * @param { any } result 接口返回值
101
+ * @param { ILoginExtAccount } params
102
+ * @returns
103
+ */
104
+ private handleLoginResult;
105
+ /**
106
+ * 校验三方用户ID
107
+ *
108
+ * @param { string } extUserId 三方用户ID
109
+ * @returns
110
+ */
111
+ private verifyExtUserId;
112
+ /**
113
+ * 三方账号统一认证登录-单点登录
114
+ *
115
+ * @param { LoginThirdAuthTokenParams } params - 单点登录配置参数
116
+ * @property { string } params.token - 单点登录Token信息
117
+ * @property { string } params.thirdPlatform - 单点登录平台名
118
+ * @property { string } params.path - 单点登录接口地址
119
+ */
120
+ loginThirdAuthToken(params: LoginThirdAuthTokenParams): Promise<IReturnResult>;
121
+ /**
122
+ * 手机验证码登录
123
+ *
124
+ * @param { LoginVerifyCodeParams } params - 登录参数
125
+ * @property { string } params.account - 账号
126
+ * @property { string } params.verificationCode - 短信验证码
127
+ * @returns { Promise<IReturnResult> } - 登录结果
128
+ */
129
+ loginXYLinkByVerifyCode(params: LoginVerifyCodeParams): Promise<IReturnResult>;
130
+ /**
131
+ * 获取图片验证码
132
+ *
133
+ * @returns { Promise<IReturnResult> } - 图片验证码结果
134
+ */
135
+ getCaptchaImage(): Promise<IReturnResult>;
136
+ /**
137
+ * 校验图片验证码
138
+ *
139
+ * @returns { Promise<{ success: boolean }> } - 校验结果
140
+ */
141
+ checkCaptchaImage(params: CheckCaptchaImageParams): Promise<{
142
+ success: boolean;
143
+ }>;
144
+ /**
145
+ * 获取短信验证码
146
+ *
147
+ * @param { string } phone - 手机号
148
+ * @returns { Promise<IReturnResult> } - 结果
149
+ */
150
+ getVerificationCode(phone: string): Promise<IReturnResult>;
151
+ /**
152
+ * 退出登录
153
+ */
154
+ logout(): void;
155
+ /**
156
+ * 上报refresh token信息
157
+ */
158
+ private handleActionMessage;
159
+ }
160
+ export default Auth;
@@ -0,0 +1,63 @@
1
+ import { IReturnResult } from '../../type/base';
2
+
3
+ /**
4
+ * 图片验证码返回结果
5
+ */
6
+ export interface CaptchaImageResult {
7
+ base: string;
8
+ top: number;
9
+ slider: string;
10
+ sliderWidth?: number;
11
+ sliderHegiht?: number;
12
+ }
13
+ /**
14
+ * 校验图片验证码参数
15
+ */
16
+ export interface CheckCaptchaImageParams {
17
+ moveX: number;
18
+ moveYList: number[];
19
+ rid?: string;
20
+ }
21
+ /**
22
+ * 小鱼账号登录参数
23
+ *
24
+ * @property { boolean } enhancePassword - 不校验密码安全策略
25
+ * @property { boolean } checkPasswordExpirationTime - 检查密码过期时间
26
+ * @property { boolean } checkPasswordEnhance - 不检查密码强度
27
+ * @property { boolean } checkTwoFactors - 检查双因子登录
28
+ */
29
+ export interface LoginOtherParams {
30
+ enhancePassword?: boolean;
31
+ checkPasswordExpirationTime?: boolean;
32
+ checkPasswordEnhance?: boolean;
33
+ checkTwoFactors?: boolean;
34
+ extId?: string;
35
+ extUserId?: string;
36
+ }
37
+ /**
38
+ * 登录状态返回结果
39
+ */
40
+ export interface XYLoginStateData extends IReturnResult {
41
+ state: XYLoginState;
42
+ }
43
+ /**
44
+ * 登录状态
45
+ */
46
+ export declare enum XYLoginState {
47
+ /**
48
+ * 登录中
49
+ */
50
+ LoggingIn = "LoggingIn",
51
+ /**
52
+ * 已登录成功
53
+ */
54
+ LoggedIn = "LoggedIn",
55
+ /**
56
+ * 已退出登录
57
+ */
58
+ LoggedOut = "LoggedOut",
59
+ /**
60
+ * 刷新token
61
+ */
62
+ TokenRefresh = "TokenRefresh"
63
+ }
@@ -0,0 +1,60 @@
1
+ import { IClientConfig, LayoutMode, XYClientEventKey } from '../../type/index';
2
+ import { default as Logger } from '../../tools/log/logger';
3
+ import { XYEmitter } from '../../tools/emitter';
4
+
5
+ export declare class XYRTCClientBase extends XYEmitter<XYClientEventKey | string> {
6
+ protected config: IClientConfig;
7
+ protected logger: Logger;
8
+ constructor(config: IClientConfig, logger: Logger);
9
+ /**
10
+ * 初始化客户端配置
11
+ *
12
+ * @param { IClientConfig } config - 客户端配置参数
13
+ */
14
+ private initConfig;
15
+ /**
16
+ * 获取是否是调试模式
17
+ */
18
+ get isDebugMode(): boolean | undefined;
19
+ /**
20
+ * 获取是否是自动布局模式
21
+ */
22
+ get isAutoLayoutMode(): boolean;
23
+ /**
24
+ * 设置布局模式
25
+ *
26
+ * @param { LayoutMode } mode - 布局模式
27
+ */
28
+ protected setClientLayoutMode(mode: LayoutMode): void;
29
+ /**
30
+ * 设置调试模式
31
+ *
32
+ * @param { boolean } flag - 是否开启debug模式
33
+ * @returns { boolean } - 当前debug状态
34
+ */
35
+ protected setDebug(flag: boolean): boolean;
36
+ /**
37
+ * 客户端推送Event消息
38
+ *
39
+ * @param { XYClientEventKey } key - 事件的Key
40
+ * @param { T[] } args - 需要推送的数据内容
41
+ */
42
+ emitMessage<T>(key: XYClientEventKey, ...args: T[]): void;
43
+ /**
44
+ * 注册客户端监听事件
45
+ * 调用时机:初始化SDK后,登录之前注册
46
+ * 关联内容:XYRTCClient事件
47
+ *
48
+ * @param { XYClientEventKey | string } key - 事件的Key
49
+ * @param { Function } listener - 事件回调函数
50
+ * @param { number? } total - 可选,回调函数触发次数,默认是-1,表示无限制
51
+ */
52
+ on(key: XYClientEventKey | string, listener: Function, total?: number): void;
53
+ /**
54
+ * 取消监听事件
55
+ *
56
+ * @param { XYDeviceEventKey | XYTrackEventKey } key - 监听器key
57
+ * @param { Function } listener - 事件回调函数, 可选
58
+ */
59
+ off(key: XYClientEventKey, listener?: Function): void;
60
+ }
@@ -0,0 +1,36 @@
1
+ import { XYClientState, XYMeetingState } from './index.type';
2
+ import { XYBaseModule } from '../../type/index';
3
+
4
+ export declare class XYRTCClientState implements XYBaseModule {
5
+ private clientState;
6
+ private meetingState;
7
+ constructor();
8
+ /**
9
+ * 收到信令服务器的入会通知
10
+ */
11
+ get isSignalConnected(): boolean;
12
+ /**
13
+ * Peer连接成功
14
+ */
15
+ get isMediaConnected(): boolean;
16
+ /**
17
+ * 信令挂断会议
18
+ */
19
+ get isSignalDisconnected(): boolean;
20
+ /**
21
+ * 挂断会议
22
+ */
23
+ get isDisconnected(): boolean;
24
+ /**
25
+ * Client处于活跃状态
26
+ */
27
+ get isClientActive(): boolean;
28
+ getClientState(): XYClientState;
29
+ setClientState(state: XYClientState): void;
30
+ getMeetingState(): XYMeetingState;
31
+ setMeetingState(state: XYMeetingState): void;
32
+ /**
33
+ * 销毁资源
34
+ */
35
+ destroy(): void;
36
+ }