@xylink/xy-rtc-sdk 4.0.3 → 4.0.5

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 (148) hide show
  1. package/action/ability.d.ts +0 -1
  2. package/action/api.d.ts +15 -1
  3. package/action/auth.d.ts +3 -4
  4. package/action/base.d.ts +2 -3
  5. package/action/config.d.ts +2 -3
  6. package/action/control.d.ts +3 -4
  7. package/action/enterprise.d.ts +4 -5
  8. package/action/http.d.ts +2 -3
  9. package/action/index.d.ts +9 -10
  10. package/action/index.type.d.ts +0 -1
  11. package/action/log.d.ts +1 -2
  12. package/action/meeting.d.ts +17 -4
  13. package/enum/client.d.ts +0 -1
  14. package/enum/constraints.d.ts +0 -1
  15. package/enum/errorCode/server.d.ts +0 -1
  16. package/enum/errorCode/signal.d.ts +0 -1
  17. package/enum/index.d.ts +8 -1
  18. package/enum/meeting.d.ts +0 -1
  19. package/enum/polling.d.ts +0 -1
  20. package/export/tools.d.ts +17 -0
  21. package/feature/artboard/index.d.ts +10 -4
  22. package/feature/audioPCM/index.d.ts +29 -0
  23. package/feature/contentPreserver/index.d.ts +38 -0
  24. package/feature/customMessage/index.d.ts +1 -2
  25. package/feature/edu/index.d.ts +1 -2
  26. package/feature/edu/index.type.d.ts +0 -1
  27. package/feature/im/index.d.ts +2 -3
  28. package/feature/query/index.d.ts +2 -3
  29. package/feature/speaker/index.d.ts +2 -3
  30. package/feature/speaker/index.type.d.ts +0 -1
  31. package/feature/translation/index.d.ts +34 -0
  32. package/feature/vep/index.d.ts +56 -0
  33. package/feature/vep/index.type.d.ts +139 -0
  34. package/index.d.ts +11 -9
  35. package/interface/clientInterface.type.d.ts +11 -12
  36. package/interface/contentTrackInterface.type.d.ts +0 -1
  37. package/interface/event.type.d.ts +10 -2
  38. package/interface/extension.type.d.ts +10 -0
  39. package/interface/processor.type.d.ts +9 -0
  40. package/interface/videoAudioTrackInterface.type.d.ts +2 -3
  41. package/main/ability/const.d.ts +0 -1
  42. package/main/ability/index.d.ts +1 -2
  43. package/main/auth/index.d.ts +9 -17
  44. package/main/auth/index.type.d.ts +0 -1
  45. package/main/auth/rule.d.ts +9 -0
  46. package/main/client/clientBase.d.ts +10 -3
  47. package/main/client/clientState.d.ts +1 -2
  48. package/main/client/index.d.ts +66 -47
  49. package/main/client/rule.d.ts +19 -0
  50. package/main/device/index.d.ts +12 -5
  51. package/main/device/index.type.d.ts +22 -0
  52. package/main/helper/i18n.d.ts +0 -1
  53. package/main/helper/index.d.ts +9 -2
  54. package/main/layout/index.d.ts +11 -5
  55. package/main/layout/index.type.d.ts +2 -3
  56. package/main/layout/polling.d.ts +2 -3
  57. package/main/layout/state.d.ts +3 -4
  58. package/main/layout/template/index.d.ts +0 -1
  59. package/main/layout/template/manager.d.ts +0 -1
  60. package/main/layout/template/mobile.d.ts +0 -1
  61. package/main/layout/template/polling.d.ts +0 -1
  62. package/main/media/index.d.ts +4 -5
  63. package/main/media/index.type.d.ts +0 -1
  64. package/main/meeting/control.d.ts +1 -2
  65. package/main/meeting/control.type.d.ts +0 -1
  66. package/main/meeting/index.d.ts +8 -3
  67. package/main/meeting/rule.d.ts +3 -0
  68. package/main/meeting/verify.d.ts +1 -2
  69. package/main/peer/index.d.ts +37 -9
  70. package/main/peer/index.type.d.ts +24 -1
  71. package/main/peer/state.d.ts +4 -0
  72. package/main/plugin/audioPCM/audio-processor.worklet.d.ts +1 -0
  73. package/main/plugin/audioPCM/index.d.ts +31 -0
  74. package/main/plugin/audioPCM/index.type.d.ts +29 -0
  75. package/main/plugin/audioPCM/processor.d.ts +68 -0
  76. package/main/plugin/contentPreserver/index.d.ts +30 -0
  77. package/main/plugin/contentPreserver/index.type.d.ts +69 -0
  78. package/main/plugin/contentPreserver/processor.d.ts +127 -0
  79. package/main/plugin/index.d.ts +1 -2
  80. package/main/plugin/index.type.d.ts +21 -0
  81. package/main/quality/index.d.ts +0 -1
  82. package/main/quality/report.d.ts +2 -2
  83. package/main/render/audioManager.d.ts +45 -0
  84. package/main/render/index.d.ts +27 -11
  85. package/main/render/index.type.d.ts +2 -6
  86. package/main/render/videoManager.d.ts +36 -3
  87. package/main/render/videoManager.type.d.ts +10 -0
  88. package/main/roster/index.d.ts +41 -2
  89. package/main/server/index.d.ts +3 -4
  90. package/main/server/index.type.d.ts +2 -0
  91. package/main/signal/index.d.ts +1 -2
  92. package/main/socket/index.d.ts +2 -3
  93. package/main/stream/index.d.ts +9 -9
  94. package/main/track/baseTrack.d.ts +4 -5
  95. package/main/track/contentTrack.d.ts +80 -6
  96. package/main/track/customContentTrack.d.ts +2 -3
  97. package/main/track/customVideoAudioTrack.d.ts +2 -3
  98. package/main/track/helper.d.ts +1 -13
  99. package/main/track/videoAudioCapture.d.ts +1 -2
  100. package/main/track/videoAudioTrack.d.ts +88 -13
  101. package/main/vom/config.d.ts +9 -0
  102. package/main/vom/index.d.ts +5 -2
  103. package/package.json +6 -3
  104. package/tools/analyser/index.d.ts +0 -1
  105. package/tools/analyser/manager.d.ts +1 -2
  106. package/tools/config.d.ts +0 -1
  107. package/tools/log/db.d.ts +0 -1
  108. package/tools/log/logger.d.ts +0 -1
  109. package/tools/log/logger.worker.d.ts +1 -1
  110. package/tools/log/loggerManager.d.ts +1 -2
  111. package/tools/socket/socket.d.ts +2 -3
  112. package/tools/socket/socketManager.d.ts +2 -3
  113. package/tools/utils.d.ts +4 -125
  114. package/type/ability.d.ts +3 -1
  115. package/type/analyser.d.ts +0 -1
  116. package/type/base.d.ts +5 -5
  117. package/type/capture.d.ts +0 -1
  118. package/type/client.d.ts +9 -48
  119. package/type/index.d.ts +1 -0
  120. package/type/layout.d.ts +1 -2
  121. package/type/meeting.d.ts +4 -5
  122. package/type/quality.d.ts +1 -2
  123. package/type/stream.d.ts +11 -4
  124. package/type/subtitle.d.ts +86 -0
  125. package/type/track.d.ts +12 -4
  126. package/xyrtc.js +15952 -14725
  127. package/tools/data/list.d.ts +0 -87
  128. package/tools/data/map.d.ts +0 -17
  129. package/tools/detector/browser.d.ts +0 -114
  130. package/tools/detector/index.d.ts +0 -187
  131. package/tools/detector/index.type.d.ts +0 -51
  132. package/tools/detector/stream.d.ts +0 -77
  133. package/tools/detector/stream.type.d.ts +0 -56
  134. package/tools/emitter.d.ts +0 -42
  135. package/tools/frame/index.d.ts +0 -36
  136. package/tools/frame/index.type.d.ts +0 -1
  137. package/tools/index.d.ts +0 -72
  138. package/tools/pressure/index.d.ts +0 -26
  139. package/tools/pressure/index.type.d.ts +0 -22
  140. package/tools/queue/async.d.ts +0 -45
  141. package/tools/queue/queue.type.d.ts +0 -10
  142. package/tools/queue/sync.d.ts +0 -36
  143. package/tools/resize.d.ts +0 -64
  144. package/tools/snapshot/index.d.ts +0 -23
  145. package/tools/snapshot/index.type.d.ts +0 -38
  146. package/tools/store.d.ts +0 -47
  147. package/tools/verify.d.ts +0 -14
  148. package/tools/window.d.ts +0 -31
package/index.d.ts CHANGED
@@ -1,12 +1,14 @@
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
1
  import { default as XYRTCClient } from './main/client';
7
-
2
+ import { default as ContentTrack } from './main/track/contentTrack';
3
+ import { default as VideoAudioTrack } from './main/track/videoAudioTrack';
4
+ import { Logger } from './export/tools';
5
+ import { ICheckSystemRequirements } from '@xylink/xy-toolkit';
6
+ import { IClientConfig, TLocale, XYVersion } from './type/index';
7
+ import { XYIMClient } from './feature/im';
8
+ import { XYAudioPCMExtension } from './main/plugin/audioPCM/index';
9
+ import { XYAudioPCMProcessor } from './main/plugin/audioPCM/processor';
8
10
  export * from './main/helper/index';
9
- export * from './tools/index';
11
+ export * from './export/tools';
10
12
  /**
11
13
  * XYLink WebRTC SDK 入口
12
14
  */
@@ -28,7 +30,7 @@ export default class XYRTC {
28
30
  /**
29
31
  * 日志管理器,可以同时获取多个日志实例内容
30
32
  */
31
- static logManager: import('./tools/index').LogManager;
33
+ static logManager: import('./export/tools').LogManager;
32
34
  /**
33
35
  * 创建会议客户端XYRTCClient模块,提供实时音视频通话框架能力,一次会议创建一次即可
34
36
  * 使用场景:1、创建多人会议客户端;2、实现会中和会外设备设置、会前预览画面等功能
@@ -81,7 +83,7 @@ export default class XYRTC {
81
83
  /**
82
84
  * 导出 MODULES
83
85
  */
84
- export { XYRTCClient, VideoAudioTrack, ContentTrack, XYIMClient };
86
+ export { XYRTCClient, VideoAudioTrack, ContentTrack, XYIMClient, XYAudioPCMExtension, XYAudioPCMProcessor };
85
87
  /**
86
88
  * 导出 TYPE 类型定义
87
89
  */
@@ -1,11 +1,10 @@
1
- import { CheckCaptchaImageParams, LoginOtherParams } from '../main/auth/index.type';
2
- import { XYEnterpriseInfo, XYSensitiveWords, XYUicustomization } from '../main/meeting/index.type';
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
1
  import { default as VideoAudioTrack } from '../main/track/videoAudioTrack';
8
-
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';
4
+ import { AudioAnalyser } from '../tools/analyser';
5
+ import { XYEnterpriseInfo, XYSensitiveWords, XYUicustomization } from '../main/meeting/index.type';
6
+ import { CheckCaptchaImageParams, LoginOtherParams } from '../main/auth/index.type';
7
+ import { SnapshotParams, SnapshotResult } from '@xylink/xy-toolkit';
9
8
  export interface XYClientIF {
10
9
  /**
11
10
  * 初始化
@@ -65,14 +64,14 @@ export interface XYClientIF {
65
64
  playVideo(idList?: string[]): Promise<void>;
66
65
  requestNewLayout(reqList: IReqInfo[], maxViewCountPerPage: number, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
67
66
  requestAutoPollingLayout(command: TCommand, interval: number | undefined, reqList: IReqInfo[]): Promise<boolean>;
68
- removeAudioRender(key: string): void;
69
- removeVideoRenderer(id: string): void;
70
- removeSlaveVideoRenderer(rosterId?: string, viewId?: string): void;
67
+ removeAudioRenderer(key: string): Promise<void>;
68
+ removeVideoRenderer(id: string): Promise<void>;
69
+ removeSlaveVideoRenderer(rosterId?: string, viewId?: string): Promise<void>;
71
70
  setFocusView(id: string): Promise<string>;
72
71
  setPageInfo(currentPage?: number): Promise<IReturnResult>;
73
- setVideoRenderer(id: string, wrapEleId: string): void;
72
+ setVideoRenderer(id: string, wrapEleId: string): Promise<void>;
74
73
  setLocalViewParams(params: LocalViewParams): Promise<IReturnResult>;
75
- setSlaveVideoRenderer(id: string, wrapEleId: string): void;
74
+ setSlaveVideoRenderer(id: string, wrapEleId: string): Promise<void>;
76
75
  setAudioRenderer(streamId: string, ele: HTMLAudioElement): Promise<void>;
77
76
  switchLayout(templateMode?: IMode): Promise<IMode>;
78
77
  setLayoutConfig(config: LayoutConfig): void;
@@ -1,5 +1,4 @@
1
1
  import { ContentTrackConfig, IReturnResult, XYElectronSource } from '../type/index';
2
-
3
2
  export interface XYContentTrackIF {
4
3
  capture(config?: ContentTrackConfig): Promise<IReturnResult>;
5
4
  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-12-23 14:35:42
5
+ * Last modified : 2025-03-11 14:28:17
6
6
  */
7
7
  /**
8
8
  * SDK客户端事件Key枚举
@@ -437,7 +437,15 @@ export declare enum XYTrackEventKey {
437
437
  * 调用方式:执行videoAudioTrack.capture()方式时上报
438
438
  * 相关内容:N/A
439
439
  */
440
- TRACK_ERROR = "track-error"
440
+ TRACK_ERROR = "track-error",
441
+ /**
442
+ * 音频PCM数据事件
443
+ */
444
+ AUDIO_PCM_DATA = "audio-pcm-data",
445
+ /**
446
+ * 音频PCM错误事件
447
+ */
448
+ AUDIO_PCM_ERROR = "audio-pcm-error"
441
449
  }
442
450
  /**
443
451
  * 设备事件Key枚举
@@ -0,0 +1,10 @@
1
+ import { PluginType } from '../type/index';
2
+ export interface XYPluginIF<T> {
3
+ init(): void;
4
+ getVersion(): string;
5
+ getPluginType(): PluginType;
6
+ getPluginName(): string;
7
+ destroy(): void;
8
+ isSupportExtension(): boolean;
9
+ createProcessor(config: any): T | null;
10
+ }
@@ -0,0 +1,9 @@
1
+ import { IProcessTrack, PluginType } from '../type/track';
2
+ export interface XYProcessorIF {
3
+ getProcessorType(): PluginType;
4
+ enable(): Promise<boolean>;
5
+ disable(): Promise<boolean>;
6
+ getEnablePluginState(): boolean;
7
+ process(track: IProcessTrack): Promise<IProcessTrack>;
8
+ destroy(): void;
9
+ }
@@ -1,12 +1,11 @@
1
- import { DEVICE_KIND, IFacingMode, IProcessTrack, IReturnResult, PeopleTrackConfig, SwitchDeviceConfig } from '../type/index';
2
1
  import { default as VideoAudioTrack } from '../main/track/videoAudioTrack';
3
-
2
+ import { DEVICE_KIND, IFacingMode, IReturnResult, PeopleTrackConfig, SwitchDeviceConfig } from '../type/index';
4
3
  export interface XYVideoAudioTrackIF {
5
4
  capture(config?: PeopleTrackConfig): Promise<any>;
6
5
  close(): void;
7
6
  connect(processor: any): VideoAudioTrack;
8
7
  getAudioLevel(): Promise<number>;
9
- processorDestination(processTrack: IProcessTrack): Promise<MediaStream>;
8
+ processorDestination<T>(processTrack: T): Promise<T>;
10
9
  switchCamera(facingMode?: IFacingMode): Promise<IFacingMode>;
11
10
  switchDevice(type: DEVICE_KIND, deviceId: string, config?: SwitchDeviceConfig): Promise<IReturnResult>;
12
11
  }
@@ -1,5 +1,4 @@
1
1
  import { LocalAbility } from '../../type/index';
2
-
3
2
  /**
4
3
  * 本地能力集
5
4
  */
@@ -1,6 +1,5 @@
1
- import { default as XYRTCClient } from '../client';
2
1
  import { AbilityResult } from '../../type/index';
3
-
2
+ import { default as XYRTCClient } from '../client';
4
3
  declare class Ability {
5
4
  private abilityResult;
6
5
  private logger;
@@ -1,7 +1,6 @@
1
- import { CheckCaptchaImageParams, LoginOtherParams, XYLoginState } from './index.type';
2
- import { default as XYRTCClient } from '../client';
3
1
  import { ILoginExtAccount, ISdkUserInfo, ILoginInfo, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, LoginTokenInfo, IReturnResult, LoginThirdAuthTokenParams, LoginVerifyCodeParams } from '../../type/index';
4
-
2
+ import { default as XYRTCClient } from '../client';
3
+ import { CheckCaptchaImageParams, LoginOtherParams } from './index.type';
5
4
  declare class Auth {
6
5
  private client;
7
6
  private logger;
@@ -12,7 +11,7 @@ declare class Auth {
12
11
  private loginState;
13
12
  private rid;
14
13
  constructor(client: XYRTCClient);
15
- getLoginState(): XYLoginState;
14
+ get isLoggedIn(): boolean;
16
15
  getLoginInfo(): ILoginInfo;
17
16
  setLoginInfo(loginInfo: ILoginInfo): void;
18
17
  destroy(): void;
@@ -43,12 +42,12 @@ declare class Auth {
43
42
  * 授权码登录
44
43
  *
45
44
  * @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
45
+ * @param { string } params.extId 企业id
46
+ * @param { string } params.extUserId 用户id
47
+ * @param { string } params.displayName 用户名称
48
+ * @param { string } params.oauthCode 授权码
49
+ * @param { boolean } params.isTempUser 是否临时账户
50
+ * @param { string } params.channelId 渠道id
52
51
  * @return { Promise<IReturnResult> } - 返回结果
53
52
  */
54
53
  loginWithAuthCode(params: ILoginWidthAuthCode): Promise<IReturnResult>;
@@ -102,13 +101,6 @@ declare class Auth {
102
101
  * @returns
103
102
  */
104
103
  private handleLoginResult;
105
- /**
106
- * 校验三方用户ID
107
- *
108
- * @param { string } extUserId 三方用户ID
109
- * @returns
110
- */
111
- private verifyExtUserId;
112
104
  /**
113
105
  * 三方账号统一认证登录-单点登录
114
106
  *
@@ -1,5 +1,4 @@
1
1
  import { IReturnResult } from '../../type/base';
2
-
3
2
  /**
4
3
  * 图片验证码返回结果
5
4
  */
@@ -0,0 +1,9 @@
1
+ import { Rule } from '@xylink/xy-toolkit';
2
+ declare const loginExternalAccountRule: Record<string, Rule>;
3
+ declare const loginWithAuthCodeRule: Record<string, Rule>;
4
+ declare const loginXYAccountRule: Record<string, Rule>;
5
+ declare const loginExtUserIdRule: Record<string, Rule>;
6
+ declare const loginExtTokenRule: Record<string, Rule>;
7
+ declare const loginVerifyCodeRule: Record<string, Rule>;
8
+ declare const loginThirdAuthTokenRule: Record<string, Rule>;
9
+ export { loginExternalAccountRule, loginWithAuthCodeRule, loginXYAccountRule, loginExtUserIdRule, loginExtTokenRule, loginVerifyCodeRule, loginThirdAuthTokenRule };
@@ -1,7 +1,6 @@
1
- import { IClientConfig, LayoutMode, XYClientEventKey } from '../../type/index';
1
+ import { XYEmitter } from '@xylink/xy-toolkit';
2
2
  import { default as Logger } from '../../tools/log/logger';
3
- import { XYEmitter } from '../../tools/emitter';
4
-
3
+ import { IClientConfig, LayoutMode, XYClientEventKey } from '../../type/index';
5
4
  export declare class XYRTCClientBase extends XYEmitter<XYClientEventKey | string> {
6
5
  protected config: IClientConfig;
7
6
  protected logger: Logger;
@@ -57,4 +56,12 @@ export declare class XYRTCClientBase extends XYEmitter<XYClientEventKey | string
57
56
  * @param { Function } listener - 事件回调函数, 可选
58
57
  */
59
58
  off(key: XYClientEventKey, listener?: Function): void;
59
+ /**
60
+ * 获取参数校验失败状态
61
+ *
62
+ * @param { any } params - 参数
63
+ * @param { any } errors - 错误信息
64
+ * @param { string } tip - 提示信息
65
+ */
66
+ getParamErrorStatus(params: any, tip: string): import('../../type/index').IReturnResult;
60
67
  }
@@ -1,6 +1,5 @@
1
- import { XYClientState, XYMeetingState } from './index.type';
2
1
  import { XYBaseModule } from '../../type/index';
3
-
2
+ import { XYClientState, XYMeetingState } from './index.type';
4
3
  export declare class XYRTCClientState implements XYBaseModule {
5
4
  private clientState;
6
5
  private meetingState;
@@ -1,34 +1,33 @@
1
- import { XY_WHITEBOARD_DATA } from '../../feature/artboard/index.type';
2
- import { CheckCaptchaImageParams, LoginOtherParams } from '../auth/index.type';
3
- import { XYMemberDepartment } from '../../feature/query/index.type';
4
- import { XYIMClient } from '../../feature/im';
5
- import { XYDevicePressure } from '../../tools/pressure';
6
- import { default as RosterManager } from '../roster';
7
- import { XYEDU } from '../../feature/edu';
8
- import { XYServerInfo } from '../server/index.type';
9
- import { default as ServerManager } from '../server';
10
- import { XYSignal } from '../signal';
11
- import { XYMediaManager } from '../media';
12
- import { SocketManager } from '../../tools/socket/socketManager';
13
- import { XYClientSocket } from '../socket';
14
- import { XYRender } from '../render';
15
- import { XYMeetingControl } from '../meeting/control';
16
- import { XYPlugin } from '../plugin';
17
- import { VOM } from '../vom';
18
- import { XYRTCClientState } from './clientState';
19
- import { XYRTCClientBase } from './clientBase';
20
- import { default as Auth } from '../auth/index';
21
- import { default as Action } from '../../action/index';
22
- import { default as ContentTrack } from '../track/contentTrack';
23
- import { default as VideoAudioTrack } from '../track/videoAudioTrack';
24
- import { default as Meeting } from '../meeting';
25
- import { default as LayoutManager } from '../layout';
26
- import { default as Logger } from '../../tools/log/logger';
27
- import { default as Stream } from '../stream';
28
- import { default as Peer } from '../peer/index';
29
- import { SnapshotParams } from '../../tools/index';
30
1
  import { IClientConfig, ICall, IMakeCall, IInvite, IRoster, ILoginExtAccount, IVideoAudioType, IMode, IReqInfo, TCommand, ContentMode, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl, IVideoControlResult, ICustomMessageConfig, OperateType, PushType, LayoutMode, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, IReturnResult, InviteInfo, LayoutOrientationType, AnalyserConfig, IFeatureConfigValue, IFeatureConfigKey, MEETING_DIRECTION, LocalViewParams, AbilityResult, IExportUserInfo, IVideoProfile, ReconnectEntry, LoginTokenInfo, LayoutConfig, IStateParams, IScreenInfo, IInternals, XYClientIF, IGetConferenceParams, XYCheckNumberParams, LoginThirdAuthTokenParams, LoginVerifyCodeParams, XYWebRxAudioStatus, ClientInfoConfig } from '../../type/index';
31
-
2
+ import { SnapshotParams, XYDevicePressure } from '@xylink/xy-toolkit';
3
+ import { default as Peer } from '../peer/index';
4
+ import { default as Stream } from '../stream';
5
+ import { default as Logger } from '../../tools/log/logger';
6
+ import { default as LayoutManager } from '../layout';
7
+ import { default as Meeting } from '../meeting';
8
+ import { default as VideoAudioTrack } from '../track/videoAudioTrack';
9
+ import { default as ContentTrack } from '../track/contentTrack';
10
+ import { default as Action } from '../../action/index';
11
+ import { default as Auth } from '../auth/index';
12
+ import { XYRTCClientBase } from './clientBase';
13
+ import { XYRTCClientState } from './clientState';
14
+ import { VOM } from '../vom';
15
+ import { XYPlugin } from '../plugin';
16
+ import { XYMeetingControl } from '../meeting/control';
17
+ import { XYRender } from '../render';
18
+ import { XYClientSocket } from '../socket';
19
+ import { SocketManager } from '../../tools/socket/socketManager';
20
+ import { XYMediaManager } from '../media';
21
+ import { XYSignal } from '../signal';
22
+ import { default as ServerManager } from '../server';
23
+ import { XYServerInfo } from '../server/index.type';
24
+ import { XYEDU } from '../../feature/edu';
25
+ import { default as RosterManager } from '../roster';
26
+ import { XYIMClient } from '../../feature/im';
27
+ import { XYMemberDepartment } from '../../feature/query/index.type';
28
+ import { CheckCaptchaImageParams, LoginOtherParams } from '../auth/index.type';
29
+ import { XY_WHITEBOARD_DATA } from '../../feature/artboard/index.type';
30
+ import { XYVepManager } from '../../feature/vep';
32
31
  export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
33
32
  logger: Logger;
34
33
  private action;
@@ -47,7 +46,6 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
47
46
  private contentMode;
48
47
  private isSubscribeBulkRoster;
49
48
  private qualityReport;
50
- private isSubscribeTranslation;
51
49
  private featureConfig;
52
50
  private operateQueue;
53
51
  private audioStatus;
@@ -67,6 +65,8 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
67
65
  protected devicePressure?: XYDevicePressure;
68
66
  private queryService;
69
67
  private artboard;
68
+ private vepManager?;
69
+ private translationManager;
70
70
  private socketManager;
71
71
  private onDocumentChange;
72
72
  constructor(config: IClientConfig, logger: Logger);
@@ -77,7 +77,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
77
77
  getCallInfo(): ICall;
78
78
  getClientConfig(): IClientConfig;
79
79
  getVideoManagerMap(): import('../../type/index').XYVideoRendererMap;
80
- getAudioManagers(): import('../../type/index').IAudioRenders;
80
+ getAudioManagerMap(): import('../../type/index').XYAudioRendererMap;
81
81
  getPreviewStreams(): import('../../type/index').IGetMediaStreams;
82
82
  getAudioStreamConfig(): import('../../type/index').IStreamConfig | undefined;
83
83
  getStreamInstance(): Stream;
@@ -88,7 +88,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
88
88
  getMakeCallParams(): IMakeCall;
89
89
  getLayoutManager(): LayoutManager;
90
90
  getRosterManager(): RosterManager;
91
- getAnalyserManager(): import('../../tools/index').AnalyserManager;
91
+ getAnalyserManager(): import('../..').AnalyserManager;
92
92
  getUserInfo(): IExportUserInfo | null;
93
93
  getVOM(): VOM;
94
94
  getErrorCode(): import('../../type/index').ICodeList;
@@ -106,6 +106,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
106
106
  getIsAutoLayoutMode(): boolean;
107
107
  getMeetingControl(): XYMeetingControl;
108
108
  getImClient(): XYIMClient | null;
109
+ getVepManager(): XYVepManager | undefined;
109
110
  /**
110
111
  * 获取服务器地址
111
112
  *
@@ -246,7 +247,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
246
247
  * @param { AnalyserConfig } config - Analyser分析器构造器配置
247
248
  * @return { AudioAnalyser || null } - Analyser分析器
248
249
  */
249
- getAudioAnalyser(id?: string, config?: AnalyserConfig): IReturnResult | import('../../tools/index').AudioAnalyser | null;
250
+ getAudioAnalyser(id?: string, config?: AnalyserConfig): IReturnResult | import('../..').AudioAnalyser | null;
250
251
  /**
251
252
  * 销毁音频分析器,释放资源
252
253
  * 调用时机:业务组件销毁或者讲话人麦克风静音时
@@ -500,7 +501,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
500
501
  * @param { string } id - 参会者Layout Id
501
502
  * @param { string } wrapEle 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
502
503
  */
503
- setVideoRenderer(id: string, wrapEleId: string): void;
504
+ setVideoRenderer(id: string, wrapEleId: string): Promise<void>;
504
505
  /**
505
506
  * 设置重复画面视频播放容器元素,SDK接管控制视频的重复播放和画面渲染
506
507
  * 注意:当key所对应的状态发生变化后,需要重新调用此方法重新播放画面
@@ -512,13 +513,13 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
512
513
  * @param { string } id - 参会者Layout Id
513
514
  * @param { string } wrapEleId 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
514
515
  */
515
- setSlaveVideoRenderer(id: string, wrapEleId: string): void;
516
+ setSlaveVideoRenderer(id: string, wrapEleId: string): Promise<void>;
516
517
  /**
517
518
  * 移除视频播放容器元素,释放资源
518
519
  *
519
520
  * @param { string } id - 参会者Layout Id
520
521
  */
521
- removeVideoRenderer(id: string): void;
522
+ removeVideoRenderer(id: string): Promise<void>;
522
523
  /**
523
524
  * 移除重复视画面频播放容器元素,释放资源
524
525
  * 如果layoutId和viewId没有填写,则清空所有的Slave配置数据
@@ -528,7 +529,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
528
529
  * @param { string } id - 可选,参会者Layout Id
529
530
  * @param { string } viewId - 可选,包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
530
531
  */
531
- removeSlaveVideoRenderer(id?: string, viewId?: string): void;
532
+ removeSlaveVideoRenderer(id?: string, viewId?: string): Promise<void>;
532
533
  /**
533
534
  * 画面播放异常情况下,重新播放本地视频
534
535
  */
@@ -565,7 +566,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
565
566
  *
566
567
  * @param { string } id - MediaStream的Id字段
567
568
  */
568
- removeAudioRender(key: string): void;
569
+ removeAudioRenderer(key: string): Promise<void>;
569
570
  /**
570
571
  * 指定画面屏幕截图
571
572
  * 使用场景:针对参会者画面截图并上传服务器等操作
@@ -579,7 +580,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
579
580
  *
580
581
  * @returns { Promise<SnapshotResult> } - 截图信息
581
582
  */
582
- getSnapshot(params: SnapshotParams): Promise<import('../../tools/index').SnapshotResult>;
583
+ getSnapshot(params: SnapshotParams): Promise<import('@xylink/xy-toolkit').SnapshotResult>;
583
584
  /**
584
585
  * 设置本地画面渲染参数
585
586
  * 使用场景:入会前预览本地画面、会中切换本地画面镜像显示
@@ -848,7 +849,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
848
849
  *
849
850
  * @param { PushType } pushType - 推送类型,用来区分Content和People画面流
850
851
  */
851
- peerPublish(track: VideoAudioTrack, pushType: PushType): void;
852
+ peerPublish(track: VideoAudioTrack | ContentTrack, pushType: PushType): void;
852
853
  /**
853
854
  * 关闭麦克风
854
855
  * 调用时机:加入会议成功后调用
@@ -974,7 +975,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
974
975
  * @param { object? } extParams - 可选,控制额外的参数
975
976
  * @returns { Promise<boolean> } - 是否请求成功
976
977
  */
977
- requestNewLayout(reqList: IReqInfo[], maxViewCountPerPage: number, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
978
+ requestNewLayout(reqList: any, maxViewCountPerPage: number, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
978
979
  /**
979
980
  * 自定义布局-自动轮询请求参会者的视频流
980
981
  * 使用场景:教育平台调用全部画面数据
@@ -1180,7 +1181,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
1180
1181
  /**
1181
1182
  * 签到
1182
1183
  *
1183
- * @property { string } questionnaireId - 业务ID
1184
+ * @property { string } questionnaireId - 业务ID,必须是1-50位的字母、数字、下划线或连字符
1184
1185
  * @returns { Promise<SignInResult> } - 签到结果
1185
1186
  */
1186
1187
  signIn(questionnaireId: string): Promise<IReturnResult>;
@@ -1290,10 +1291,6 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
1290
1291
  * @since 4.0.2
1291
1292
  */
1292
1293
  refreshAbility(): Promise<void>;
1293
- /**
1294
- * 校验clientId/clientSecret
1295
- */
1296
- private verifyParameter;
1297
1294
  /**
1298
1295
  * 推送错误消息
1299
1296
  *
@@ -1311,6 +1308,28 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
1311
1308
  * @returns {Promise<boolean>} 挂断成功返回true,失败则reject错误信息
1312
1309
  */
1313
1310
  hangup(reason?: string, blockSendSocket?: boolean): Promise<boolean>;
1311
+ /**
1312
+ * AI-播放虚拟数字人(VEP)
1313
+ *
1314
+ * @since 3.9.11
1315
+ * @param { string } sessionID - 数字人ID
1316
+ * @param { string } displayName - 数字人名称
1317
+ */
1318
+ playDigitalHuman(sessionID: string, displayName: string): Promise<void>;
1319
+ /**
1320
+ * AI-停止虚拟数字人设备(VEP)
1321
+ *
1322
+ * @since 3.9.11
1323
+ * @param { string } sessionID - 数字人ID
1324
+ */
1325
+ stopDigitalHuman(sessionID: string): Promise<boolean>;
1326
+ /**
1327
+ * AI-播放合成语音内容(TTS)
1328
+ *
1329
+ * @since 3.9.11
1330
+ * @param { string } txt - 播放文本内容
1331
+ */
1332
+ playVirtualTTS(txt: string): Promise<void>;
1314
1333
  /**
1315
1334
  * 挂断会议,销毁资源
1316
1335
  * 调用时机: 挂断会议,如果不再需要使用client,应调用该接口及时销毁client实例,以释放相关资源;再次使用时,需重新创建client
@@ -0,0 +1,19 @@
1
+ import { Rule } from '@xylink/xy-toolkit';
2
+ declare const loginXYLinkAccountRule: Record<string, Rule>;
3
+ declare const makeCallRule: Record<string, Rule>;
4
+ declare const bindTrackGroupRule: Record<string, Rule>;
5
+ export declare const signInRule: Record<string, Rule>;
6
+ declare const verifyControlPasswordRule: Record<string, Rule>;
7
+ declare const audioAnalyserRule: Record<string, Rule>;
8
+ declare const registerPluginsRule: Record<string, Rule>;
9
+ declare const featureConfigRule: Record<string, Rule>;
10
+ declare const switchFeatureConfigRule: Record<string, Rule>;
11
+ declare const setVideoProfileRule: Record<string, Rule>;
12
+ declare const setLocalViewParamsRule: Record<string, Rule>;
13
+ declare const sendVideoControlResultRule: Record<string, Rule>;
14
+ declare const setLayoutOrientationRule: Record<string, Rule>;
15
+ declare const switchDebugRule: Record<string, Rule>;
16
+ declare const getSnapshotRule: Record<string, Rule>;
17
+ declare const setSlaveVideoRendererRule: Record<string, Rule>;
18
+ declare const requestNewLayoutRule: Record<string, Rule>;
19
+ export { makeCallRule, bindTrackGroupRule, verifyControlPasswordRule, audioAnalyserRule, registerPluginsRule, featureConfigRule, switchFeatureConfigRule, setVideoProfileRule, setLocalViewParamsRule, sendVideoControlResultRule, setLayoutOrientationRule, switchDebugRule, getSnapshotRule, setSlaveVideoRendererRule, requestNewLayoutRule, loginXYLinkAccountRule };
@@ -1,7 +1,6 @@
1
- import { IDeviceInfo, IDeviceList, ICurrentPermission, PermissionType, FacingMode, DEVICE_KIND, IDeviceId, ISetSpecDevice, IUsedDeviceParams, ISpecStateParams, XYDeviceEventKey } from '../../type/index';
2
- import { XYEmitter } from '../../tools/emitter';
3
1
  import { default as Logger } from '../../tools/log/logger';
4
-
2
+ import { XYEmitter } from '@xylink/xy-toolkit';
3
+ import { IDeviceInfo, IDeviceList, ICurrentPermission, PermissionType, FacingMode, DEVICE_KIND, IDeviceId, ISetSpecDevice, IUsedDeviceParams, ISpecStateParams, XYDeviceEventKey, XYDeviceMode } from '../../type/index';
5
4
  /**
6
5
  * DeviceManager模块,用于管理枚举设备列表、监听设备变动、处理设备权限等功能
7
6
  *
@@ -25,6 +24,7 @@ declare class DeviceManager extends XYEmitter<XYDeviceEventKey> {
25
24
  private systemDefaultDeviceId;
26
25
  private specifiedDefaultDeviceId;
27
26
  private deviceLabelMap;
27
+ private currentDeviceMode;
28
28
  private onDeviceChangeEvent;
29
29
  private onUpdateFullDeviceList;
30
30
  constructor(logger?: Logger);
@@ -38,6 +38,13 @@ declare class DeviceManager extends XYEmitter<XYDeviceEventKey> {
38
38
  * 调用时机:MakeCall时调用、当前实例被创建时
39
39
  */
40
40
  initDeviceAndPermission(): Promise<void>;
41
+ /**
42
+ * 设置当前设备模式
43
+ *
44
+ * @param { DEVICE_KIND } kind - 设备类型
45
+ * @param { XYDeviceMode } mode - 设备模式
46
+ */
47
+ setCurrentDeviceMode(kind: DEVICE_KIND, mode: XYDeviceMode): this;
41
48
  /**
42
49
  * 计算并缓存系统默认、指定设备两种类型设备的默认值
43
50
  *
@@ -116,10 +123,10 @@ declare class DeviceManager extends XYEmitter<XYDeviceEventKey> {
116
123
  /**
117
124
  * 设置输出设备
118
125
  *
119
- * @param { * } element - Audio元素节点
126
+ * @param { HTMLAudioElement } element - Audio元素节点
120
127
  * @param { string } deviceId - 切换的设备ID,可能包含DEFAULT设备
121
128
  */
122
- setAudioOutputDevice(element: any, deviceId: string): Promise<void>;
129
+ setAudioOutputDevice(element: HTMLAudioElement, deviceId: string): Promise<void>;
123
130
  /**
124
131
  * 更新指定设备的状态
125
132
  */
@@ -98,6 +98,28 @@ export type ISpecifiedDeviceConfig = {
98
98
  deviceId: string;
99
99
  state: SpecifiedState;
100
100
  };
101
+ /**
102
+ * 当前设备模式
103
+ *
104
+ * @param SYSTEM system - 系统默认模式
105
+ * @param SPECIFIED specified - 指定设备模式
106
+ */
107
+ export declare enum XYDeviceMode {
108
+ 'SYSTEM' = "SYSTEM",
109
+ 'SPECIFIED' = "SPECIFIED"
110
+ }
111
+ /**
112
+ * 当前设备模式
113
+ *
114
+ * @property { XYDeviceMode } audioInput - 麦克风设备
115
+ * @property { XYDeviceMode } audioOutput - 扬声器设备
116
+ * @property { XYDeviceMode } videoInput - 摄像头设备
117
+ */
118
+ export interface XYCurrentDeviceMode {
119
+ audioInput: XYDeviceMode;
120
+ audioOutput: XYDeviceMode;
121
+ videoInput: XYDeviceMode;
122
+ }
101
123
  /**
102
124
  * 用户指定设备信息
103
125
  *
@@ -1,5 +1,4 @@
1
1
  import { TLocale } from '../../type/index';
2
-
3
2
  export declare let locale: TLocale;
4
3
  /**
5
4
  * 设置语言
@@ -1,6 +1,5 @@
1
- import { XYRotationVideoInfo } from './index.type';
2
1
  import { IRotationInfoTotalItem, IRotateStyle, XYSupportedCodec, DEVICE_KIND } from '../../type/index';
3
-
2
+ import { XYRotationVideoInfo } from './index.type';
4
3
  /**
5
4
  * 获取真实视频分辨率的宽高、比值
6
5
  *
@@ -118,3 +117,11 @@ export declare const setOutputAudioDevice: (element: any, deviceId: string) => P
118
117
  * @returns { string } hideId
119
118
  */
120
119
  export declare const getHideId: (hideId: string | number) => string;
120
+ /**
121
+ * 根据TrackId获取StreamId
122
+ *
123
+ * @param { string } trackId - TrackId
124
+ * @param { boolean } isVideo - 是否是视频流
125
+ * @returns { string } - MediaStream ID
126
+ */
127
+ export declare const getStreamIdByTrackId: (trackId: string, isVideo?: boolean) => string;
@@ -1,9 +1,8 @@
1
- import { XYLayoutManagerState } from './state';
2
- import { default as Logger } from '../../tools/log/logger';
3
- import { default as Polling } from './polling';
4
- import { default as Client } from '../client';
5
1
  import { ILayout, IRoster, IScreenInfo, IOutputCustomLayout, ILayoutRoster, IConfInfo, IPageInfo, VideoQuality, StreamResolutionLevel, TLayoutMap, TemplateMode, IMode, LayoutOrientationType, LayoutConfig, PollingState, FocusViewConfig, LocalViewParams } from '../../type/index';
6
-
2
+ import { default as Client } from '../client';
3
+ import { default as Polling } from './polling';
4
+ import { default as Logger } from '../../tools/log/logger';
5
+ import { XYLayoutManagerState } from './state';
7
6
  export default class LayoutManager {
8
7
  logger: Logger;
9
8
  client: Client;
@@ -60,6 +59,13 @@ export default class LayoutManager {
60
59
  getPolling(): Polling;
61
60
  getPollingState(): PollingState;
62
61
  setSortedRosterList(rosterList: IRoster[]): void;
62
+ /**
63
+ * 根据Layout Id判断是否是本地画面
64
+ *
65
+ * @param { string } id - Layout Id
66
+ * @returns { boolean } - 是否是本地画面
67
+ */
68
+ isLocalByLayoutId(id: string): boolean;
63
69
  /**
64
70
  * 全屏请流
65
71
  *