@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
@@ -1,5 +1,4 @@
1
1
  import { AbilityAPIKey, AbilityUrlInfo } from './index.type';
2
-
3
2
  declare class AbilityAPIManager {
4
3
  /**
5
4
  * 获取云会议室信息
package/action/api.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { APIUrlInfo } from './index.type';
2
-
3
2
  declare class XYApi {
4
3
  /**
5
4
  * 不加密登录
@@ -248,5 +247,20 @@ declare class XYApi {
248
247
  * 获取企业信息,包含企业信息配置title/icon、企业名称
249
248
  */
250
249
  static enterpriseInfo: APIUrlInfo;
250
+ /**
251
+ * 创建虚拟数字人设备
252
+ * 添加时间:2024/12/20
253
+ */
254
+ static createVep: APIUrlInfo;
255
+ /**
256
+ * 开启字幕
257
+ * https://yapi.xylink.com/project/1843/interface/api/214819
258
+ */
259
+ static startSubtitles: APIUrlInfo;
260
+ /**
261
+ * 停止字幕
262
+ * https://yapi.xylink.com/project/1843/interface/api/214828
263
+ */
264
+ static stopSubtitles: APIUrlInfo;
251
265
  }
252
266
  export default XYApi;
package/action/auth.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { CheckCaptchaImageParams, LoginOtherParams } from '../main/auth/index.type';
2
- import { default as BaseAction } from './base';
3
- import { default as Action } from '.';
4
1
  import { ILoginExtAccount, ILoginWidthAuthCode, ISdkUserInfo, LoginParams, LoginThirdAuthTokenParams, LoginType, LoginVerifyCodeParams, RegisterAndLoginParams } from '../type/auth';
5
-
2
+ import { default as Action } from '.';
3
+ import { default as BaseAction } from './base';
4
+ import { CheckCaptchaImageParams, LoginOtherParams } from '../main/auth/index.type';
6
5
  declare class AuthAction extends BaseAction {
7
6
  constructor(action: Action);
8
7
  /**
package/action/base.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { default as Logger } from '../tools/log/logger';
2
- import { default as Action, ICommonParams } from '.';
3
1
  import { default as HttpClient } from './http';
4
-
2
+ import { default as Action, ICommonParams } from '.';
3
+ import { default as Logger } from '../tools/log/logger';
5
4
  declare class BaseAction {
6
5
  action: Action;
7
6
  http: HttpClient;
@@ -1,7 +1,6 @@
1
- import { IStateParams } from '../type/client';
2
- import { default as BaseAction } from './base';
3
1
  import { default as Action } from '.';
4
-
2
+ import { default as BaseAction } from './base';
3
+ import { IStateParams } from '../type/client';
5
4
  declare class ConfigAction extends BaseAction {
6
5
  private seqId;
7
6
  private statesTime;
@@ -1,8 +1,7 @@
1
- import { FocusViewAction } from '../type/client';
2
- import { default as BaseAction } from './base';
3
- import { default as Action } from '.';
4
1
  import { SignInTextParams } from '../type/meeting';
5
-
2
+ import { default as Action } from '.';
3
+ import { default as BaseAction } from './base';
4
+ import { FocusViewAction } from '../type/client';
6
5
  declare class MeetingControlAction extends BaseAction {
7
6
  constructor(action: Action);
8
7
  /**
@@ -1,9 +1,8 @@
1
- import { XYSensitiveWords } from '../main/meeting/index.type';
2
- import { XYDepAndTitleParams } from '../type/index';
3
- import { default as BaseAction } from './base';
4
- import { default as Action } from '.';
5
1
  import { IMediaConfigParam } from '../type/meeting';
6
-
2
+ import { default as Action } from '.';
3
+ import { default as BaseAction } from './base';
4
+ import { XYDepAndTitleParams } from '../type/index';
5
+ import { XYSensitiveWords } from '../main/meeting/index.type';
7
6
  declare class EnterpriseAction extends BaseAction {
8
7
  constructor(action: Action);
9
8
  /**
package/action/http.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { IToken } from '../type/index';
2
- import { default as Logger } from '../tools/log/logger';
3
1
  import { AxiosRequestConfig, AxiosInstance, AxiosError } from 'axios';
4
-
2
+ import { default as Logger } from '../tools/log/logger';
3
+ import { IToken } from '../type/index';
5
4
  export interface IResponseSuccess {
6
5
  code: number;
7
6
  data: any;
package/action/index.d.ts CHANGED
@@ -1,14 +1,13 @@
1
- import { XYEmitter } from '../tools/emitter';
2
- import { default as LogAction } from './log';
3
- import { default as MeetingControlAction } from './control';
4
- import { default as EnterpriseAction } from './enterprise';
5
- import { default as MeetingAction } from './meeting';
6
- import { default as ConfigAction } from './config';
7
- import { default as AuthAction } from './auth';
8
- import { default as Logger } from '../tools/log/logger';
9
- import { IMeetingInfo, IToken, XYActionKey } from '../type/index';
10
1
  import { default as HttpClient } from './http';
11
-
2
+ import { IMeetingInfo, IToken, XYActionKey } from '../type/index';
3
+ import { default as Logger } from '../tools/log/logger';
4
+ import { default as AuthAction } from './auth';
5
+ import { default as ConfigAction } from './config';
6
+ import { default as MeetingAction } from './meeting';
7
+ import { default as EnterpriseAction } from './enterprise';
8
+ import { default as MeetingControlAction } from './control';
9
+ import { default as LogAction } from './log';
10
+ import { XYEmitter } from '@xylink/xy-toolkit';
12
11
  export interface ICommonParams {
13
12
  securityKey: string;
14
13
  callUri?: string;
@@ -1,5 +1,4 @@
1
1
  import { Method } from 'axios';
2
-
3
2
  /**
4
3
  * 支持能力集的接口key
5
4
  */
package/action/log.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { default as BaseAction } from './base';
2
1
  import { default as Action } from '.';
3
-
2
+ import { default as BaseAction } from './base';
4
3
  /**
5
4
  * 日志模块
6
5
  */
@@ -1,8 +1,7 @@
1
- import { AutoMute } from '../type/index';
2
- import { IMeetingInviteParams } from '../type/action';
3
- import { default as BaseAction } from './base';
4
1
  import { default as Action } from '.';
5
-
2
+ import { default as BaseAction } from './base';
3
+ import { IMeetingInviteParams } from '../type/action';
4
+ import { AutoMute } from '../type/index';
6
5
  /**
7
6
  * 会议室管理模块
8
7
  */
@@ -103,5 +102,19 @@ declare class MeetingAction extends BaseAction {
103
102
  * @returns
104
103
  */
105
104
  checkStorageSpaceWithRecordingUrl(recordingUrl: string): Promise<any>;
105
+ /**
106
+ * 创建虚拟数字人设备
107
+ */
108
+ createVirtualPeople(): Promise<any>;
109
+ /**
110
+ * 开启字幕
111
+ * @returns
112
+ */
113
+ startSubtitles(): Promise<any>;
114
+ /**
115
+ * 停止字幕
116
+ * @returns
117
+ */
118
+ stopSubtitles(): Promise<any>;
106
119
  }
107
120
  export default MeetingAction;
package/enum/client.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { IClientConfig } from '../type/index';
2
-
3
2
  export declare const DEFAULT_LOG_STYLE = "color: #3876ff;";
4
3
  export declare const DEFAULT_LINE = "*********************************************************";
5
4
  /**
@@ -1,5 +1,4 @@
1
1
  import { XYContentConfig, XYPeopleConfig, StreamResolution, ConstraintMode, StreamFrameRate } from '../type/index';
2
-
3
2
  /**
4
3
  * people基础约束配置
5
4
  */
@@ -1,5 +1,4 @@
1
1
  import { TLocale } from '../../type/base';
2
-
3
2
  /**
4
3
  * 代码错误提示
5
4
  */
@@ -1,5 +1,4 @@
1
1
  import { TLocale } from '../../type/index';
2
-
3
2
  /**
4
3
  * disconnected:此类详情返回的code都是state:200,无法从code区分,只能从此detail值区分
5
4
  */
package/enum/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { IDefault, IOPERATE_MAP, IRoster, IFeatureConfig, StreamStatus, StreamType, ILoggerConfig, FacingMode, StreamResolution, TemplateMode, ContentTemplateMode, LayoutConfig, IMediaConfig, IMakeCall, ContentTrackConfig, PeopleTrackConfig, SwitchDeviceConfig, DEVICE_KIND } from '../type/index';
2
-
3
2
  export * from './constraints';
4
3
  export * from './analyser';
5
4
  export declare const LOG_CACHE_COUNT = 10;
@@ -294,3 +293,11 @@ export declare const INIT_CONTENT_STREAMS: {};
294
293
  * 匹配除了大小写字母、数字、汉字以及空格、特定的标点符号((-_--.))和特殊字符之外的任何字符
295
294
  */
296
295
  export declare const SPECIAL_CHARACTERS_REGEX: RegExp;
296
+ /**
297
+ * 视频编解码器优先级规则
298
+ */
299
+ export declare const VIDEO_CODEC_MAP: string[];
300
+ /**
301
+ * 音频编解码器优先级规则
302
+ */
303
+ export declare const AUDIO_CODEC_MAP: string[];
package/enum/meeting.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { XYNotificationType } from '../type/meeting';
2
-
3
2
  /**
4
3
  * 签到文案匹配
5
4
  */
package/enum/polling.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  import { ILayout } from '../type/index';
2
-
3
2
  export declare const DEFAULT_POLLING_LAYOUT: ILayout;
@@ -0,0 +1,17 @@
1
+ import { default as Logger } from '../tools/log/logger';
2
+ /**
3
+ * 音频分析相关模块
4
+ */
5
+ export { AudioAnalyser } from '../tools/analyser';
6
+ export { AnalyserManager } from '../tools/analyser/manager';
7
+ /**
8
+ * 日志模块
9
+ */
10
+ export { DBManager } from '../tools/log/db';
11
+ export { Logger };
12
+ export { LogManager, logManager } from '../tools/log/loggerManager';
13
+ /**
14
+ * 设备和采集能力检测相关模块
15
+ */
16
+ export { XYDetector, XYStreamDetector, XYBrowserDetector, XYEmitter, XYStore, DetectStreamType, } from '@xylink/xy-toolkit';
17
+ export type { ICheckSystemRequirements } from '@xylink/xy-toolkit';
@@ -1,8 +1,7 @@
1
- import { XY_WHITEBOARD_DATA, XYAnnotationState } from './index.type';
2
- import { XYBaseModule } from '../../type/index';
3
- import { default as Logger } from '../../tools/log/logger';
4
1
  import { default as XYRTCClient } from '../../main/client';
5
-
2
+ import { default as Logger } from '../../tools/log/logger';
3
+ import { XYBaseModule } from '../../type/index';
4
+ import { XY_WHITEBOARD_DATA, XYAnnotationState } from './index.type';
6
5
  /**
7
6
  * 白板消息模块
8
7
  * 职责:
@@ -63,6 +62,13 @@ export declare class XYArtboard implements XYBaseModule {
63
62
  * @param data
64
63
  */
65
64
  onAnnotationStateChanged(data: XYAnnotationState): void;
65
+ /**
66
+ * 根据serverConfig下发的白板域名,获取最终的白板wss地址
67
+ *
68
+ * @param { string } url - 信令下发的url
69
+ * @returns { string } 最终的白板wss地址
70
+ */
71
+ private getWhiteboardUrl;
66
72
  /**
67
73
  * 连接白板
68
74
  * 注意: 一次会议连接一次,无需断开;如果异常断开,再重新连接
@@ -0,0 +1,29 @@
1
+ import { XYAudioPCMExtension } from '../../main/plugin/audioPCM';
2
+ import { XYAudioPCMOptions } from '../../main/plugin/audioPCM/index.type';
3
+ import { XYAudioPCMProcessor } from '../../main/plugin/audioPCM/processor';
4
+ /**
5
+ * AudioPCMManager类管理AudioPCMProcessor实例,用于处理音频流
6
+ */
7
+ declare class XYAudioPCMTool {
8
+ private pcmMap;
9
+ private plugin;
10
+ constructor();
11
+ /**
12
+ * 获取音频PCM插件实例
13
+ *
14
+ * @returns { XYAudioPCMExtension } - 音频PCM插件实例
15
+ */
16
+ getPlugin(): XYAudioPCMExtension;
17
+ /**
18
+ * 获取指定rosterId的AudioPCMProcessor实例,如果不存在则创建一个新的实例。
19
+ * @param { string } rosterId - 指定的rosterId,用于标识AudioPCMProcessor实例。
20
+ * @returns { AudioPCMProcessor } 返回AudioPCMProcessor实例。
21
+ */
22
+ getAudioPCMProcessor(rosterId: string, config?: XYAudioPCMOptions): XYAudioPCMProcessor | null;
23
+ /**
24
+ * 销毁所有AudioPCMProcessor实例,并清空pcmMap。
25
+ */
26
+ destroy(): void;
27
+ }
28
+ declare const audioPCMTool: XYAudioPCMTool;
29
+ export { audioPCMTool, XYAudioPCMTool };
@@ -0,0 +1,38 @@
1
+ import { XYContentPreserverExtension } from '../../main/plugin/contentPreserver/index';
2
+ import { XYContentPreserverProcessor } from '../../main/plugin/contentPreserver/processor';
3
+ declare class XYContentPreserverTool {
4
+ private plugin;
5
+ private contentProcessor;
6
+ constructor();
7
+ /**
8
+ * 获取内容快照插件实例
9
+ * @returns { XYContentPreserverExtension } - 内容快照插件实例
10
+ */
11
+ getPlugin(): XYContentPreserverExtension;
12
+ /**
13
+ * 获取内容处理器实例
14
+ *
15
+ * @returns { XYContentPreserverProcessor | null } - 内容处理器实例
16
+ */
17
+ getContentProcessor(): XYContentPreserverProcessor | null;
18
+ /**
19
+ * 检测浏览器是否支持内容快照插件
20
+ *
21
+ * @returns { boolean } - 是否支持内容快照插件
22
+ */
23
+ isSupportExtension(): boolean | undefined;
24
+ /**
25
+ * 销毁内容快照插件实例
26
+ */
27
+ destroyPlugin(): void;
28
+ /**
29
+ * 销毁内容处理器实例
30
+ */
31
+ destroyProcessor(): void;
32
+ /**
33
+ * 销毁内容快照插件实例和内容处理器实例
34
+ */
35
+ destroy(): void;
36
+ }
37
+ declare const contentPreserverTool: XYContentPreserverTool;
38
+ export { contentPreserverTool };
@@ -1,6 +1,5 @@
1
- import { ICustomMessageConfig, XYBaseModule } from '../../type/index';
2
1
  import { default as XYRTCClient } from '../../main/client';
3
-
2
+ import { ICustomMessageConfig, XYBaseModule } from '../../type/index';
4
3
  export declare class XYCustomMessage implements XYBaseModule {
5
4
  private client;
6
5
  private logger;
@@ -1,6 +1,5 @@
1
- import { IConference, IGetConferenceParams, IReqInfo, TCommand, XYBaseModule } from '../../type/index';
2
1
  import { default as XYRTCClient } from '../../main/client';
3
-
2
+ import { IConference, IGetConferenceParams, IReqInfo, TCommand, XYBaseModule } from '../../type/index';
4
3
  export declare class XYEDU implements XYBaseModule {
5
4
  private client;
6
5
  private logger;
@@ -1,5 +1,4 @@
1
1
  import { IToken } from '../../type/base';
2
-
3
2
  /**
4
3
  * 会议室麦克风状态
5
4
  *
@@ -1,7 +1,6 @@
1
- import { XYEmitter } from '../../tools/emitter';
2
- import { IReturnResult, XYBaseModule, XYIMEventKey } from '../../type/index';
3
1
  import { default as XYRTCClient } from '../../main/client';
4
-
2
+ import { IReturnResult, XYBaseModule, XYIMEventKey } from '../../type/index';
3
+ import { XYEmitter } from '@xylink/xy-toolkit';
5
4
  export declare class XYIMClient extends XYEmitter<XYIMEventKey> implements XYBaseModule {
6
5
  private client;
7
6
  private logger;
@@ -1,7 +1,6 @@
1
- import { default as XYRTCClient } from '../../main/client';
2
- import { XYMemberDepartment } from './index.type';
3
1
  import { default as Logger } from '../../tools/log/logger';
4
-
2
+ import { XYMemberDepartment } from './index.type';
3
+ import { default as XYRTCClient } from '../../main/client';
5
4
  export declare class XYQueryService {
6
5
  private client;
7
6
  logger: Logger;
@@ -1,7 +1,6 @@
1
- import { default as Logger } from '../../tools/log/logger';
2
- import { default as XYRTCClient } from '../../main/client';
3
1
  import { SpeakersInfoItem, XYBaseModule } from '../../type/index';
4
-
2
+ import { default as XYRTCClient } from '../../main/client';
3
+ import { default as Logger } from '../../tools/log/logger';
5
4
  export declare class XYSpeaker implements XYBaseModule {
6
5
  logger: Logger;
7
6
  private client;
@@ -1,5 +1,4 @@
1
1
  import { AnalyserNode } from '../../type/index';
2
-
3
2
  /**
4
3
  * 实时讲话人内部数据
5
4
  */
@@ -0,0 +1,34 @@
1
+ import { default as Client } from '../../main/client';
2
+ import { TLocalLanguage } from '../../type/client';
3
+ declare class XYTranslationManager {
4
+ private client;
5
+ private logger;
6
+ private isSubscribeTranslation;
7
+ constructor(client: Client);
8
+ /**
9
+ * 开启通话字幕
10
+ */
11
+ startTranslation(): Promise<import('../..').IReturnResult>;
12
+ /**
13
+ * 停止通话字幕
14
+ */
15
+ stopTranslation(): Promise<import('../..').IReturnResult>;
16
+ /**
17
+ * 通话字幕,设置本地说话的语言
18
+ * 调用时机:​​startTranslation​​开启字幕功能后调用
19
+ * 相关内容:​​通话字幕
20
+ *
21
+ * @param { TLocalLanguage } language - 设置的语言
22
+ * @returns { Promise<IReturnResult> } - 返回结果
23
+ */
24
+ setTranslationLanguage(language: TLocalLanguage): Promise<import('../..').IReturnResult>;
25
+ /**
26
+ * 重新开启通话字幕
27
+ * 调用时机:​​startTranslation​​开启字幕功能后调用,媒体网关断开重连后调用
28
+ * 相关内容:​​通话字幕
29
+ *
30
+ * @returns { Promise<IReturnResult> } - 返回结果
31
+ */
32
+ reStartTranslation(): Promise<void>;
33
+ }
34
+ export default XYTranslationManager;
@@ -0,0 +1,56 @@
1
+ import { default as Client } from '../../main/client';
2
+ import { default as Logger } from '../../tools/log/logger';
3
+ declare class XYVepManager {
4
+ client: Client;
5
+ logger: Logger;
6
+ private vepRoster;
7
+ private retryCount;
8
+ private seq;
9
+ private taskQueue;
10
+ constructor(client: Client);
11
+ /**
12
+ * 播放vep数字人设备
13
+ *
14
+ * @param { string } sessionID - 数字人ID
15
+ * @param { string } displayName - 数字人名称
16
+ */
17
+ playDigitalHuman(sessionID: string, displayName: string): Promise<void>;
18
+ /**
19
+ * 播放合成语音
20
+ *
21
+ * @param { string } txt - 需要合成语音的文本内容
22
+ */
23
+ playVirtualTTS(txt: string): Promise<void>;
24
+ /**
25
+ * 发送播放数字人消息
26
+ *
27
+ * @param { string } sessionId - 数字人ID
28
+ * @param { string } displayName - 数字人名称
29
+ */
30
+ playDigitalHumanMsg(sessionId: string, displayName: string): boolean;
31
+ /**
32
+ * 停止vep数字人设备
33
+ *
34
+ * @param { string } sessionID - 数字人ID
35
+ */
36
+ stopDigitalHuman(sessionId: string): Promise<boolean>;
37
+ /**
38
+ * 发送播放合成语音消息
39
+ *
40
+ * @param { string } txt - 文本
41
+ */
42
+ playVirtualTTSMsg(txt: string): Promise<boolean>;
43
+ /**
44
+ * 检测或创建虚拟终端
45
+ */
46
+ detectVirtualPeople(): Promise<void>;
47
+ /**
48
+ * 创建虚拟终端设备
49
+ */
50
+ private inviteVirtualPeople;
51
+ /**
52
+ * 销毁VEP虚拟终端设备
53
+ */
54
+ destroy(): void;
55
+ }
56
+ export { XYVepManager };
@@ -0,0 +1,139 @@
1
+ /**
2
+ * AI能力枚举
3
+ */
4
+ export declare enum EAIAbilityType {
5
+ /** 无能力 */
6
+ kAbilityTypeNone = 0,
7
+ /** 小鱼通用AI能力(保留) */
8
+ kAbilityTypeXylinkAI = 1,
9
+ /** 小鱼人脸识别 */
10
+ kAbilityTypeMatrix = 2,
11
+ /** 小鱼同传 */
12
+ kAbilityTypeSimulInterpr = 3,
13
+ /** 小鱼翻译 */
14
+ kAbilityTypeLangTrans = 4,
15
+ /** 小鱼语音合成 */
16
+ kAbilityTypeTTS = 5,
17
+ /** 第三方AI能力 */
18
+ kAbilityTypeThirdAI = 30
19
+ }
20
+ /**
21
+ * 业务消息MessageType枚举
22
+ */
23
+ export declare enum EBusinessMsgType {
24
+ /** 初始化消息,无需关注 */
25
+ kAIMsgTypeNone = 0,
26
+ /** 初始化消息,无需关注 */
27
+ kAIMsgServerID = 1,
28
+ /** 第三方业务消息枚举起始值 */
29
+ kThirdAIMsgType = 3000,
30
+ /** 开始人脸识别 */
31
+ kThirdAIStartFace = 3001,
32
+ /** 人脸识别结果 */
33
+ kThirdAIFaceRecogResult = 3002,
34
+ /** 人脸检测结果 */
35
+ kThirdAIFaceDetectResult = 3003,
36
+ /** 人脸检测与识别结果 */
37
+ /** 建⾏AI⼈脸检测与识别是两个不同的接⼝,分别返回,因此这个类型暂时⽤不上 */
38
+ kThirdAIFaceDetectAndRecogResult = 3004,
39
+ /** 停止人脸识别 */
40
+ kThirdAIStopFace = 3005,
41
+ /** 请求TTS合成实时播放 */
42
+ kThirdAIPlayTTS = 3006,
43
+ /** 3007:TTS播放状态 */
44
+ kThirdAITTSStatus = 3007,
45
+ /** 短语音识别请求 */
46
+ kThirdAIShortAudioRecog = 3008,
47
+ /** 短语音识别结果 */
48
+ kThirdAIShortAudioRecogResult = 3009,
49
+ /** -------------分界线,从本版本开始,每个新的业务,定义⼀个新的枚举起始值----------- */
50
+ /** 3010:播放数字人 */
51
+ kThirdAIDigitalHumanPlay = 3010,
52
+ /** 3011:停止数字人 */
53
+ kThirdAIDigitalHumanStop = 3011,
54
+ /** 3012:数字人状态通知 */
55
+ kThirdAIDigitalHumanStatus = 3012
56
+ }
57
+ /**
58
+ * 数字人状态码枚举
59
+ * AI通道自定义消息,statusCode状态码枚举
60
+ */
61
+ export declare enum XYDigitalHumanStatusCode {
62
+ /** 初始状态 */
63
+ kDHStatusNone = 0,
64
+ /** 分配rtmp推流url */
65
+ kDHStatusAssignUrl = 1,
66
+ /** 开始播放 */
67
+ kDHStatusOnPlay = 2,
68
+ /** 播放中,正常收发流时周期发送 */
69
+ kDHStatusPlaying = 3,
70
+ /** 远端取消发布,播放结束 */
71
+ kDHStatusOnStop = 4,
72
+ /** 等待远端发布流超时 */
73
+ kDHStatusWaitOnPublishTimeout = 5,
74
+ /** 远端有发布,但是没收到媒体流 */
75
+ kDHStatusWaitForwardStreamTimeout = 6,
76
+ /** 播放中断,被新的数字⼈替代(数字⼈sID变更) */
77
+ kDHStatusPlayInterrupt = 7,
78
+ /** AIGateway节点迁移,更新推流url */
79
+ kDHStatusUpdateUrl = 8
80
+ }
81
+ /**
82
+ * TTS状态码枚举
83
+ */
84
+ export declare enum XYTTSStatusCode {
85
+ /** 初始状态 */
86
+ kTTSStatusNone = 0,
87
+ /** 正在播放 */
88
+ kTTSStatusPlaying = 1,
89
+ /** 正常播放完毕 */
90
+ kTTSStatusPlayEnd = 2,
91
+ /** 连接AI服务超时 */
92
+ kTTSStatusTimeout = 3,
93
+ /** 连接AI服务异常断开 */
94
+ kTTSStatusDisconnect = 4,
95
+ /** 播放中断,被新的提示语替代 */
96
+ kTTSStatusPlayInterrupt = 5
97
+ }
98
+ /**
99
+ * 虚拟数字人状态事件
100
+ *
101
+ * @since 3.9.11
102
+ * @param { string } sID - 数字⼈SessionId
103
+ * @param { XYDigitalHumanStatusCode } statusCode - 状态码
104
+ * @param { string } statusMsg - 状态描述,其中更新url状态时为新的url地址
105
+ * @param { string } url - 可选参数,当状态码为 kDHStatusAssignUrl 和 kDHStatusUpdateUrl 才有该字段
106
+ * 注意事项:URL字段是进行AES256加密+Base64编码处理后的字符串,业务上使用时需要首先进行Encode Base64字符串,然后再进行AES256解密才可以获取到真实的URL信息
107
+ */
108
+ export interface XYDigitalHumanStatus {
109
+ sID: string;
110
+ statusCode: XYDigitalHumanStatusCode;
111
+ statusMsg: string;
112
+ url?: string;
113
+ }
114
+ /**
115
+ * 合成语音状态事件
116
+ *
117
+ * @since 3.9.11
118
+ * @param { number } id - 消息ID
119
+ * @param { XYTTSStatusCode } statusCode - 合成语音状态码
120
+ * @param { string } aiResult - AI业务返回的消息数据
121
+ */
122
+ export interface XYTTSStatus {
123
+ id: number;
124
+ statusCode: XYTTSStatusCode;
125
+ aiResult: string;
126
+ }
127
+ /**
128
+ * 小鱼AI服务消息结构
129
+ *
130
+ * @param { EBusinessMsgType } msgType - 消息类型,区分数字人和TTS消息
131
+ * @param { string } fromCallUri - 消息来源终端的callUri
132
+ * @param { XYDigitalHumanData | XYTTSData } detail - 消息详情,根据msgType区分数字人或TTS数据
133
+ *
134
+ */
135
+ export interface XYAIServiceMessage {
136
+ msgType: EBusinessMsgType;
137
+ fromCallUri: string;
138
+ detail: XYDigitalHumanStatus | XYTTSStatus;
139
+ }