@xylink/xy-rtc-sdk 4.0.2 → 4.0.4

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 (79) hide show
  1. package/action/index.d.ts +1 -1
  2. package/enum/index.d.ts +8 -0
  3. package/export/tools.d.ts +18 -0
  4. package/feature/artboard/index.d.ts +7 -0
  5. package/feature/audioPCM/index.d.ts +30 -0
  6. package/feature/contentPreserver/index.d.ts +39 -0
  7. package/feature/im/index.d.ts +1 -1
  8. package/index.d.ts +7 -4
  9. package/interface/clientInterface.type.d.ts +6 -6
  10. package/interface/event.type.d.ts +10 -2
  11. package/interface/extension.type.d.ts +11 -0
  12. package/interface/processor.type.d.ts +10 -0
  13. package/interface/videoAudioTrackInterface.type.d.ts +2 -2
  14. package/main/auth/index.d.ts +8 -15
  15. package/main/auth/rule.d.ts +10 -0
  16. package/main/client/clientBase.d.ts +9 -1
  17. package/main/client/index.d.ts +13 -18
  18. package/main/client/rule.d.ts +20 -0
  19. package/main/device/index.d.ts +12 -4
  20. package/main/device/index.type.d.ts +22 -0
  21. package/main/helper/index.d.ts +8 -0
  22. package/main/layout/index.d.ts +7 -0
  23. package/main/meeting/rule.d.ts +4 -0
  24. package/main/peer/index.d.ts +34 -5
  25. package/main/peer/index.type.d.ts +24 -0
  26. package/main/peer/state.d.ts +5 -0
  27. package/main/plugin/audioPCM/audio-processor.worklet.d.ts +1 -0
  28. package/main/plugin/audioPCM/index.d.ts +32 -0
  29. package/main/plugin/audioPCM/index.type.d.ts +29 -0
  30. package/main/plugin/audioPCM/processor.d.ts +69 -0
  31. package/main/plugin/contentPreserver/index.d.ts +31 -0
  32. package/main/plugin/contentPreserver/index.type.d.ts +69 -0
  33. package/main/plugin/contentPreserver/processor.d.ts +128 -0
  34. package/main/plugin/index.type.d.ts +21 -0
  35. package/main/quality/report.d.ts +1 -0
  36. package/main/render/audioManager.d.ts +46 -0
  37. package/main/render/index.d.ts +26 -9
  38. package/main/render/index.type.d.ts +2 -5
  39. package/main/render/videoManager.d.ts +36 -2
  40. package/main/render/videoManager.type.d.ts +10 -0
  41. package/main/server/index.type.d.ts +2 -0
  42. package/main/stream/index.d.ts +3 -2
  43. package/main/track/baseTrack.d.ts +1 -1
  44. package/main/track/contentTrack.d.ts +78 -3
  45. package/main/track/helper.d.ts +1 -13
  46. package/main/track/videoAudioTrack.d.ts +85 -9
  47. package/main/vom/config.d.ts +10 -0
  48. package/main/vom/index.d.ts +4 -0
  49. package/package.json +4 -1
  50. package/tools/log/logger.worker.d.ts +1 -1
  51. package/tools/socket/socket.d.ts +1 -1
  52. package/tools/utils.d.ts +4 -124
  53. package/type/base.d.ts +5 -5
  54. package/type/client.d.ts +3 -1
  55. package/type/stream.d.ts +8 -0
  56. package/type/track.d.ts +12 -3
  57. package/xyrtc.js +14572 -12426
  58. package/tools/data/list.d.ts +0 -87
  59. package/tools/data/map.d.ts +0 -17
  60. package/tools/detector/browser.d.ts +0 -114
  61. package/tools/detector/index.d.ts +0 -187
  62. package/tools/detector/index.type.d.ts +0 -51
  63. package/tools/detector/stream.d.ts +0 -77
  64. package/tools/detector/stream.type.d.ts +0 -56
  65. package/tools/emitter.d.ts +0 -42
  66. package/tools/frame/index.d.ts +0 -36
  67. package/tools/frame/index.type.d.ts +0 -1
  68. package/tools/index.d.ts +0 -72
  69. package/tools/pressure/index.d.ts +0 -26
  70. package/tools/pressure/index.type.d.ts +0 -22
  71. package/tools/queue/async.d.ts +0 -45
  72. package/tools/queue/queue.type.d.ts +0 -10
  73. package/tools/queue/sync.d.ts +0 -36
  74. package/tools/resize.d.ts +0 -64
  75. package/tools/snapshot/index.d.ts +0 -23
  76. package/tools/snapshot/index.type.d.ts +0 -38
  77. package/tools/store.d.ts +0 -47
  78. package/tools/verify.d.ts +0 -14
  79. package/tools/window.d.ts +0 -31
package/action/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { XYEmitter } from '../tools/emitter';
1
+ import { XYEmitter } from '@xylink/xy-toolkit';
2
2
  import { default as LogAction } from './log';
3
3
  import { default as MeetingControlAction } from './control';
4
4
  import { default as EnterpriseAction } from './enterprise';
package/enum/index.d.ts CHANGED
@@ -294,3 +294,11 @@ export declare const INIT_CONTENT_STREAMS: {};
294
294
  * 匹配除了大小写字母、数字、汉字以及空格、特定的标点符号((-_--.))和特殊字符之外的任何字符
295
295
  */
296
296
  export declare const SPECIAL_CHARACTERS_REGEX: RegExp;
297
+ /**
298
+ * 视频编解码器优先级规则
299
+ */
300
+ export declare const VIDEO_CODEC_MAP: string[];
301
+ /**
302
+ * 音频编解码器优先级规则
303
+ */
304
+ export declare const AUDIO_CODEC_MAP: string[];
@@ -0,0 +1,18 @@
1
+ import { default as Logger } from '../tools/log/logger';
2
+
3
+ /**
4
+ * 音频分析相关模块
5
+ */
6
+ export { AudioAnalyser } from '../tools/analyser';
7
+ export { AnalyserManager } from '../tools/analyser/manager';
8
+ /**
9
+ * 日志模块
10
+ */
11
+ export { DBManager } from '../tools/log/db';
12
+ export { Logger };
13
+ export { LogManager, logManager } from '../tools/log/loggerManager';
14
+ /**
15
+ * 设备和采集能力检测相关模块
16
+ */
17
+ export { XYDetector, XYStreamDetector, XYBrowserDetector, XYEmitter, XYStore, DetectStreamType, } from '@xylink/xy-toolkit';
18
+ export type { ICheckSystemRequirements } from '@xylink/xy-toolkit';
@@ -63,6 +63,13 @@ export declare class XYArtboard implements XYBaseModule {
63
63
  * @param data
64
64
  */
65
65
  onAnnotationStateChanged(data: XYAnnotationState): void;
66
+ /**
67
+ * 根据serverConfig下发的白板域名,获取最终的白板wss地址
68
+ *
69
+ * @param { string } url - 信令下发的url
70
+ * @returns { string } 最终的白板wss地址
71
+ */
72
+ private getWhiteboardUrl;
66
73
  /**
67
74
  * 连接白板
68
75
  * 注意: 一次会议连接一次,无需断开;如果异常断开,再重新连接
@@ -0,0 +1,30 @@
1
+ import { XYAudioPCMProcessor } from '../../main/plugin/audioPCM/processor';
2
+ import { XYAudioPCMOptions } from '../../main/plugin/audioPCM/index.type';
3
+ import { XYAudioPCMExtension } from '../../main/plugin/audioPCM';
4
+
5
+ /**
6
+ * AudioPCMManager类管理AudioPCMProcessor实例,用于处理音频流
7
+ */
8
+ declare class XYAudioPCMTool {
9
+ private pcmMap;
10
+ private plugin;
11
+ constructor();
12
+ /**
13
+ * 获取音频PCM插件实例
14
+ *
15
+ * @returns { XYAudioPCMExtension } - 音频PCM插件实例
16
+ */
17
+ getPlugin(): XYAudioPCMExtension;
18
+ /**
19
+ * 获取指定rosterId的AudioPCMProcessor实例,如果不存在则创建一个新的实例。
20
+ * @param { string } rosterId - 指定的rosterId,用于标识AudioPCMProcessor实例。
21
+ * @returns { AudioPCMProcessor } 返回AudioPCMProcessor实例。
22
+ */
23
+ getAudioPCMProcessor(rosterId: string, config?: XYAudioPCMOptions): XYAudioPCMProcessor | null;
24
+ /**
25
+ * 销毁所有AudioPCMProcessor实例,并清空pcmMap。
26
+ */
27
+ destroy(): void;
28
+ }
29
+ declare const audioPCMTool: XYAudioPCMTool;
30
+ export { audioPCMTool, XYAudioPCMTool };
@@ -0,0 +1,39 @@
1
+ import { XYContentPreserverProcessor } from '../../main/plugin/contentPreserver/processor';
2
+ import { XYContentPreserverExtension } from '../../main/plugin/contentPreserver/index';
3
+
4
+ declare class XYContentPreserverTool {
5
+ private plugin;
6
+ private contentProcessor;
7
+ constructor();
8
+ /**
9
+ * 获取内容快照插件实例
10
+ * @returns { XYContentPreserverExtension } - 内容快照插件实例
11
+ */
12
+ getPlugin(): XYContentPreserverExtension;
13
+ /**
14
+ * 获取内容处理器实例
15
+ *
16
+ * @returns { XYContentPreserverProcessor | null } - 内容处理器实例
17
+ */
18
+ getContentProcessor(): XYContentPreserverProcessor | null;
19
+ /**
20
+ * 检测浏览器是否支持内容快照插件
21
+ *
22
+ * @returns { boolean } - 是否支持内容快照插件
23
+ */
24
+ isSupportExtension(): boolean | undefined;
25
+ /**
26
+ * 销毁内容快照插件实例
27
+ */
28
+ destroyPlugin(): void;
29
+ /**
30
+ * 销毁内容处理器实例
31
+ */
32
+ destroyProcessor(): void;
33
+ /**
34
+ * 销毁内容快照插件实例和内容处理器实例
35
+ */
36
+ destroy(): void;
37
+ }
38
+ declare const contentPreserverTool: XYContentPreserverTool;
39
+ export { contentPreserverTool };
@@ -1,4 +1,4 @@
1
- import { XYEmitter } from '../../tools/emitter';
1
+ import { XYEmitter } from '@xylink/xy-toolkit';
2
2
  import { IReturnResult, XYBaseModule, XYIMEventKey } from '../../type/index';
3
3
  import { default as XYRTCClient } from '../../main/client';
4
4
 
package/index.d.ts CHANGED
@@ -1,12 +1,15 @@
1
+ import { XYAudioPCMProcessor } from './main/plugin/audioPCM/processor';
2
+ import { XYAudioPCMExtension } from './main/plugin/audioPCM/index';
1
3
  import { XYIMClient } from './feature/im';
2
4
  import { IClientConfig, TLocale, XYVersion } from './type/index';
3
- import { Logger, ICheckSystemRequirements } from './tools/index';
5
+ import { ICheckSystemRequirements } from '@xylink/xy-toolkit';
6
+ import { Logger } from './export/tools';
4
7
  import { default as VideoAudioTrack } from './main/track/videoAudioTrack';
5
8
  import { default as ContentTrack } from './main/track/contentTrack';
6
9
  import { default as XYRTCClient } from './main/client';
7
10
 
8
11
  export * from './main/helper/index';
9
- export * from './tools/index';
12
+ export * from './export/tools';
10
13
  /**
11
14
  * XYLink WebRTC SDK 入口
12
15
  */
@@ -28,7 +31,7 @@ export default class XYRTC {
28
31
  /**
29
32
  * 日志管理器,可以同时获取多个日志实例内容
30
33
  */
31
- static logManager: import('./tools/index').LogManager;
34
+ static logManager: import('./export/tools').LogManager;
32
35
  /**
33
36
  * 创建会议客户端XYRTCClient模块,提供实时音视频通话框架能力,一次会议创建一次即可
34
37
  * 使用场景:1、创建多人会议客户端;2、实现会中和会外设备设置、会前预览画面等功能
@@ -81,7 +84,7 @@ export default class XYRTC {
81
84
  /**
82
85
  * 导出 MODULES
83
86
  */
84
- export { XYRTCClient, VideoAudioTrack, ContentTrack, XYIMClient };
87
+ export { XYRTCClient, VideoAudioTrack, ContentTrack, XYIMClient, XYAudioPCMExtension, XYAudioPCMProcessor };
85
88
  /**
86
89
  * 导出 TYPE 类型定义
87
90
  */
@@ -1,7 +1,7 @@
1
+ import { SnapshotParams, SnapshotResult } from '@xylink/xy-toolkit';
1
2
  import { CheckCaptchaImageParams, LoginOtherParams } from '../main/auth/index.type';
2
3
  import { XYEnterpriseInfo, XYSensitiveWords, XYUicustomization } from '../main/meeting/index.type';
3
4
  import { AudioAnalyser } from '../tools/analyser';
4
- import { SnapshotParams, SnapshotResult } from '../tools/index';
5
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
6
  import { default as ContentTrack } from '../main/track/contentTrack';
7
7
  import { default as VideoAudioTrack } from '../main/track/videoAudioTrack';
@@ -65,14 +65,14 @@ export interface XYClientIF {
65
65
  playVideo(idList?: string[]): Promise<void>;
66
66
  requestNewLayout(reqList: IReqInfo[], maxViewCountPerPage: number, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
67
67
  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;
68
+ removeAudioRenderer(key: string): Promise<void>;
69
+ removeVideoRenderer(id: string): Promise<void>;
70
+ removeSlaveVideoRenderer(rosterId?: string, viewId?: string): Promise<void>;
71
71
  setFocusView(id: string): Promise<string>;
72
72
  setPageInfo(currentPage?: number): Promise<IReturnResult>;
73
- setVideoRenderer(id: string, wrapEleId: string): void;
73
+ setVideoRenderer(id: string, wrapEleId: string): Promise<void>;
74
74
  setLocalViewParams(params: LocalViewParams): Promise<IReturnResult>;
75
- setSlaveVideoRenderer(id: string, wrapEleId: string): void;
75
+ setSlaveVideoRenderer(id: string, wrapEleId: string): Promise<void>;
76
76
  setAudioRenderer(streamId: string, ele: HTMLAudioElement): Promise<void>;
77
77
  switchLayout(templateMode?: IMode): Promise<IMode>;
78
78
  setLayoutConfig(config: LayoutConfig): 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,11 @@
1
+ import { PluginType } from '../type/index';
2
+
3
+ export interface XYPluginIF<T> {
4
+ init(): void;
5
+ getVersion(): string;
6
+ getPluginType(): PluginType;
7
+ getPluginName(): string;
8
+ destroy(): void;
9
+ isSupportExtension(): boolean;
10
+ createProcessor(config: any): T | null;
11
+ }
@@ -0,0 +1,10 @@
1
+ import { IProcessTrack, PluginType } from '../type/track';
2
+
3
+ export interface XYProcessorIF {
4
+ getProcessorType(): PluginType;
5
+ enable(): Promise<boolean>;
6
+ disable(): Promise<boolean>;
7
+ getEnablePluginState(): boolean;
8
+ process(track: IProcessTrack): Promise<IProcessTrack>;
9
+ destroy(): void;
10
+ }
@@ -1,4 +1,4 @@
1
- import { DEVICE_KIND, IFacingMode, IProcessTrack, IReturnResult, PeopleTrackConfig, SwitchDeviceConfig } from '../type/index';
1
+ import { DEVICE_KIND, IFacingMode, IReturnResult, PeopleTrackConfig, SwitchDeviceConfig } from '../type/index';
2
2
  import { default as VideoAudioTrack } from '../main/track/videoAudioTrack';
3
3
 
4
4
  export interface XYVideoAudioTrackIF {
@@ -6,7 +6,7 @@ export interface XYVideoAudioTrackIF {
6
6
  close(): void;
7
7
  connect(processor: any): VideoAudioTrack;
8
8
  getAudioLevel(): Promise<number>;
9
- processorDestination(processTrack: IProcessTrack): Promise<MediaStream>;
9
+ processorDestination<T>(processTrack: T): Promise<T>;
10
10
  switchCamera(facingMode?: IFacingMode): Promise<IFacingMode>;
11
11
  switchDevice(type: DEVICE_KIND, deviceId: string, config?: SwitchDeviceConfig): Promise<IReturnResult>;
12
12
  }
@@ -1,4 +1,4 @@
1
- import { CheckCaptchaImageParams, LoginOtherParams, XYLoginState } from './index.type';
1
+ import { CheckCaptchaImageParams, LoginOtherParams } from './index.type';
2
2
  import { default as XYRTCClient } from '../client';
3
3
  import { ILoginExtAccount, ISdkUserInfo, ILoginInfo, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, LoginTokenInfo, IReturnResult, LoginThirdAuthTokenParams, LoginVerifyCodeParams } from '../../type/index';
4
4
 
@@ -12,7 +12,7 @@ declare class Auth {
12
12
  private loginState;
13
13
  private rid;
14
14
  constructor(client: XYRTCClient);
15
- getLoginState(): XYLoginState;
15
+ get isLoggedIn(): boolean;
16
16
  getLoginInfo(): ILoginInfo;
17
17
  setLoginInfo(loginInfo: ILoginInfo): void;
18
18
  destroy(): void;
@@ -43,12 +43,12 @@ declare class Auth {
43
43
  * 授权码登录
44
44
  *
45
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
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
52
  * @return { Promise<IReturnResult> } - 返回结果
53
53
  */
54
54
  loginWithAuthCode(params: ILoginWidthAuthCode): Promise<IReturnResult>;
@@ -102,13 +102,6 @@ declare class Auth {
102
102
  * @returns
103
103
  */
104
104
  private handleLoginResult;
105
- /**
106
- * 校验三方用户ID
107
- *
108
- * @param { string } extUserId 三方用户ID
109
- * @returns
110
- */
111
- private verifyExtUserId;
112
105
  /**
113
106
  * 三方账号统一认证登录-单点登录
114
107
  *
@@ -0,0 +1,10 @@
1
+ import { Rule } from '@xylink/xy-toolkit';
2
+
3
+ declare const loginExternalAccountRule: Record<string, Rule>;
4
+ declare const loginWithAuthCodeRule: Record<string, Rule>;
5
+ declare const loginXYAccountRule: Record<string, Rule>;
6
+ declare const loginExtUserIdRule: Record<string, Rule>;
7
+ declare const loginExtTokenRule: Record<string, Rule>;
8
+ declare const loginVerifyCodeRule: Record<string, Rule>;
9
+ declare const loginThirdAuthTokenRule: Record<string, Rule>;
10
+ export { loginExternalAccountRule, loginWithAuthCodeRule, loginXYAccountRule, loginExtUserIdRule, loginExtTokenRule, loginVerifyCodeRule, loginThirdAuthTokenRule };
@@ -1,6 +1,6 @@
1
1
  import { IClientConfig, LayoutMode, XYClientEventKey } from '../../type/index';
2
2
  import { default as Logger } from '../../tools/log/logger';
3
- import { XYEmitter } from '../../tools/emitter';
3
+ import { XYEmitter } from '@xylink/xy-toolkit';
4
4
 
5
5
  export declare class XYRTCClientBase extends XYEmitter<XYClientEventKey | string> {
6
6
  protected config: IClientConfig;
@@ -57,4 +57,12 @@ export declare class XYRTCClientBase extends XYEmitter<XYClientEventKey | string
57
57
  * @param { Function } listener - 事件回调函数, 可选
58
58
  */
59
59
  off(key: XYClientEventKey, listener?: Function): void;
60
+ /**
61
+ * 获取参数校验失败状态
62
+ *
63
+ * @param { any } params - 参数
64
+ * @param { any } errors - 错误信息
65
+ * @param { string } tip - 提示信息
66
+ */
67
+ getParamErrorStatus(params: any, tip: string): import('../../type/index').IReturnResult;
60
68
  }
@@ -2,7 +2,6 @@ import { XY_WHITEBOARD_DATA } from '../../feature/artboard/index.type';
2
2
  import { CheckCaptchaImageParams, LoginOtherParams } from '../auth/index.type';
3
3
  import { XYMemberDepartment } from '../../feature/query/index.type';
4
4
  import { XYIMClient } from '../../feature/im';
5
- import { XYDevicePressure } from '../../tools/pressure';
6
5
  import { default as RosterManager } from '../roster';
7
6
  import { XYEDU } from '../../feature/edu';
8
7
  import { XYServerInfo } from '../server/index.type';
@@ -26,7 +25,7 @@ import { default as LayoutManager } from '../layout';
26
25
  import { default as Logger } from '../../tools/log/logger';
27
26
  import { default as Stream } from '../stream';
28
27
  import { default as Peer } from '../peer/index';
29
- import { SnapshotParams } from '../../tools/index';
28
+ import { SnapshotParams, XYDevicePressure } from '@xylink/xy-toolkit';
30
29
  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
30
 
32
31
  export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
@@ -77,7 +76,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
77
76
  getCallInfo(): ICall;
78
77
  getClientConfig(): IClientConfig;
79
78
  getVideoManagerMap(): import('../../type/index').XYVideoRendererMap;
80
- getAudioManagers(): import('../../type/index').IAudioRenders;
79
+ getAudioManagerMap(): import('../../type/index').XYAudioRendererMap;
81
80
  getPreviewStreams(): import('../../type/index').IGetMediaStreams;
82
81
  getAudioStreamConfig(): import('../../type/index').IStreamConfig | undefined;
83
82
  getStreamInstance(): Stream;
@@ -88,7 +87,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
88
87
  getMakeCallParams(): IMakeCall;
89
88
  getLayoutManager(): LayoutManager;
90
89
  getRosterManager(): RosterManager;
91
- getAnalyserManager(): import('../../tools/index').AnalyserManager;
90
+ getAnalyserManager(): import('../..').AnalyserManager;
92
91
  getUserInfo(): IExportUserInfo | null;
93
92
  getVOM(): VOM;
94
93
  getErrorCode(): import('../../type/index').ICodeList;
@@ -246,7 +245,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
246
245
  * @param { AnalyserConfig } config - Analyser分析器构造器配置
247
246
  * @return { AudioAnalyser || null } - Analyser分析器
248
247
  */
249
- getAudioAnalyser(id?: string, config?: AnalyserConfig): IReturnResult | import('../../tools/index').AudioAnalyser | null;
248
+ getAudioAnalyser(id?: string, config?: AnalyserConfig): IReturnResult | import('../..').AudioAnalyser | null;
250
249
  /**
251
250
  * 销毁音频分析器,释放资源
252
251
  * 调用时机:业务组件销毁或者讲话人麦克风静音时
@@ -500,7 +499,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
500
499
  * @param { string } id - 参会者Layout Id
501
500
  * @param { string } wrapEle 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
502
501
  */
503
- setVideoRenderer(id: string, wrapEleId: string): void;
502
+ setVideoRenderer(id: string, wrapEleId: string): Promise<void>;
504
503
  /**
505
504
  * 设置重复画面视频播放容器元素,SDK接管控制视频的重复播放和画面渲染
506
505
  * 注意:当key所对应的状态发生变化后,需要重新调用此方法重新播放画面
@@ -512,13 +511,13 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
512
511
  * @param { string } id - 参会者Layout Id
513
512
  * @param { string } wrapEleId 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
514
513
  */
515
- setSlaveVideoRenderer(id: string, wrapEleId: string): void;
514
+ setSlaveVideoRenderer(id: string, wrapEleId: string): Promise<void>;
516
515
  /**
517
516
  * 移除视频播放容器元素,释放资源
518
517
  *
519
518
  * @param { string } id - 参会者Layout Id
520
519
  */
521
- removeVideoRenderer(id: string): void;
520
+ removeVideoRenderer(id: string): Promise<void>;
522
521
  /**
523
522
  * 移除重复视画面频播放容器元素,释放资源
524
523
  * 如果layoutId和viewId没有填写,则清空所有的Slave配置数据
@@ -528,7 +527,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
528
527
  * @param { string } id - 可选,参会者Layout Id
529
528
  * @param { string } viewId - 可选,包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
530
529
  */
531
- removeSlaveVideoRenderer(id?: string, viewId?: string): void;
530
+ removeSlaveVideoRenderer(id?: string, viewId?: string): Promise<void>;
532
531
  /**
533
532
  * 画面播放异常情况下,重新播放本地视频
534
533
  */
@@ -565,7 +564,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
565
564
  *
566
565
  * @param { string } id - MediaStream的Id字段
567
566
  */
568
- removeAudioRender(key: string): void;
567
+ removeAudioRenderer(key: string): Promise<void>;
569
568
  /**
570
569
  * 指定画面屏幕截图
571
570
  * 使用场景:针对参会者画面截图并上传服务器等操作
@@ -579,7 +578,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
579
578
  *
580
579
  * @returns { Promise<SnapshotResult> } - 截图信息
581
580
  */
582
- getSnapshot(params: SnapshotParams): Promise<import('../../tools/index').SnapshotResult>;
581
+ getSnapshot(params: SnapshotParams): Promise<import('@xylink/xy-toolkit').SnapshotResult>;
583
582
  /**
584
583
  * 设置本地画面渲染参数
585
584
  * 使用场景:入会前预览本地画面、会中切换本地画面镜像显示
@@ -848,7 +847,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
848
847
  *
849
848
  * @param { PushType } pushType - 推送类型,用来区分Content和People画面流
850
849
  */
851
- peerPublish(track: VideoAudioTrack, pushType: PushType): void;
850
+ peerPublish(track: VideoAudioTrack | ContentTrack, pushType: PushType): void;
852
851
  /**
853
852
  * 关闭麦克风
854
853
  * 调用时机:加入会议成功后调用
@@ -974,7 +973,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
974
973
  * @param { object? } extParams - 可选,控制额外的参数
975
974
  * @returns { Promise<boolean> } - 是否请求成功
976
975
  */
977
- requestNewLayout(reqList: IReqInfo[], maxViewCountPerPage: number, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
976
+ requestNewLayout(reqList: any, maxViewCountPerPage: number, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
978
977
  /**
979
978
  * 自定义布局-自动轮询请求参会者的视频流
980
979
  * 使用场景:教育平台调用全部画面数据
@@ -1180,7 +1179,7 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
1180
1179
  /**
1181
1180
  * 签到
1182
1181
  *
1183
- * @property { string } questionnaireId - 业务ID
1182
+ * @property { string } questionnaireId - 业务ID,必须是1-50位的字母、数字、下划线或连字符
1184
1183
  * @returns { Promise<SignInResult> } - 签到结果
1185
1184
  */
1186
1185
  signIn(questionnaireId: string): Promise<IReturnResult>;
@@ -1290,10 +1289,6 @@ export default class XYRTCClient extends XYRTCClientBase implements XYClientIF {
1290
1289
  * @since 4.0.2
1291
1290
  */
1292
1291
  refreshAbility(): Promise<void>;
1293
- /**
1294
- * 校验clientId/clientSecret
1295
- */
1296
- private verifyParameter;
1297
1292
  /**
1298
1293
  * 推送错误消息
1299
1294
  *
@@ -0,0 +1,20 @@
1
+ import { Rule } from '@xylink/xy-toolkit';
2
+
3
+ declare const loginXYLinkAccountRule: Record<string, Rule>;
4
+ declare const makeCallRule: Record<string, Rule>;
5
+ declare const bindTrackGroupRule: Record<string, Rule>;
6
+ export declare const signInRule: Record<string, Rule>;
7
+ declare const verifyControlPasswordRule: Record<string, Rule>;
8
+ declare const audioAnalyserRule: Record<string, Rule>;
9
+ declare const registerPluginsRule: Record<string, Rule>;
10
+ declare const featureConfigRule: Record<string, Rule>;
11
+ declare const switchFeatureConfigRule: Record<string, Rule>;
12
+ declare const setVideoProfileRule: Record<string, Rule>;
13
+ declare const setLocalViewParamsRule: Record<string, Rule>;
14
+ declare const sendVideoControlResultRule: Record<string, Rule>;
15
+ declare const setLayoutOrientationRule: Record<string, Rule>;
16
+ declare const switchDebugRule: Record<string, Rule>;
17
+ declare const getSnapshotRule: Record<string, Rule>;
18
+ declare const setSlaveVideoRendererRule: Record<string, Rule>;
19
+ declare const requestNewLayoutRule: Record<string, Rule>;
20
+ export { makeCallRule, bindTrackGroupRule, verifyControlPasswordRule, audioAnalyserRule, registerPluginsRule, featureConfigRule, switchFeatureConfigRule, setVideoProfileRule, setLocalViewParamsRule, sendVideoControlResultRule, setLayoutOrientationRule, switchDebugRule, getSnapshotRule, setSlaveVideoRendererRule, requestNewLayoutRule, loginXYLinkAccountRule };
@@ -1,5 +1,5 @@
1
- import { IDeviceInfo, IDeviceList, ICurrentPermission, PermissionType, FacingMode, DEVICE_KIND, IDeviceId, ISetSpecDevice, IUsedDeviceParams, ISpecStateParams, XYDeviceEventKey } from '../../type/index';
2
- import { XYEmitter } from '../../tools/emitter';
1
+ import { IDeviceInfo, IDeviceList, ICurrentPermission, PermissionType, FacingMode, DEVICE_KIND, IDeviceId, ISetSpecDevice, IUsedDeviceParams, ISpecStateParams, XYDeviceEventKey, XYDeviceMode } from '../../type/index';
2
+ import { XYEmitter } from '@xylink/xy-toolkit';
3
3
  import { default as Logger } from '../../tools/log/logger';
4
4
 
5
5
  /**
@@ -25,6 +25,7 @@ declare class DeviceManager extends XYEmitter<XYDeviceEventKey> {
25
25
  private systemDefaultDeviceId;
26
26
  private specifiedDefaultDeviceId;
27
27
  private deviceLabelMap;
28
+ private currentDeviceMode;
28
29
  private onDeviceChangeEvent;
29
30
  private onUpdateFullDeviceList;
30
31
  constructor(logger?: Logger);
@@ -38,6 +39,13 @@ declare class DeviceManager extends XYEmitter<XYDeviceEventKey> {
38
39
  * 调用时机:MakeCall时调用、当前实例被创建时
39
40
  */
40
41
  initDeviceAndPermission(): Promise<void>;
42
+ /**
43
+ * 设置当前设备模式
44
+ *
45
+ * @param { DEVICE_KIND } kind - 设备类型
46
+ * @param { XYDeviceMode } mode - 设备模式
47
+ */
48
+ setCurrentDeviceMode(kind: DEVICE_KIND, mode: XYDeviceMode): this;
41
49
  /**
42
50
  * 计算并缓存系统默认、指定设备两种类型设备的默认值
43
51
  *
@@ -116,10 +124,10 @@ declare class DeviceManager extends XYEmitter<XYDeviceEventKey> {
116
124
  /**
117
125
  * 设置输出设备
118
126
  *
119
- * @param { * } element - Audio元素节点
127
+ * @param { HTMLAudioElement } element - Audio元素节点
120
128
  * @param { string } deviceId - 切换的设备ID,可能包含DEFAULT设备
121
129
  */
122
- setAudioOutputDevice(element: any, deviceId: string): Promise<void>;
130
+ setAudioOutputDevice(element: HTMLAudioElement, deviceId: string): Promise<void>;
123
131
  /**
124
132
  * 更新指定设备的状态
125
133
  */
@@ -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
  *
@@ -118,3 +118,11 @@ export declare const setOutputAudioDevice: (element: any, deviceId: string) => P
118
118
  * @returns { string } hideId
119
119
  */
120
120
  export declare const getHideId: (hideId: string | number) => string;
121
+ /**
122
+ * 根据TrackId获取StreamId
123
+ *
124
+ * @param { string } trackId - TrackId
125
+ * @param { boolean } isVideo - 是否是视频流
126
+ * @returns { string } - MediaStream ID
127
+ */
128
+ export declare const getStreamIdByTrackId: (trackId: string, isVideo?: boolean) => string;
@@ -60,6 +60,13 @@ export default class LayoutManager {
60
60
  getPolling(): Polling;
61
61
  getPollingState(): PollingState;
62
62
  setSortedRosterList(rosterList: IRoster[]): void;
63
+ /**
64
+ * 根据Layout Id判断是否是本地画面
65
+ *
66
+ * @param { string } id - Layout Id
67
+ * @returns { boolean } - 是否是本地画面
68
+ */
69
+ isLocalByLayoutId(id: string): boolean;
63
70
  /**
64
71
  * 全屏请流
65
72
  *
@@ -0,0 +1,4 @@
1
+ import { Rule } from '@xylink/xy-toolkit';
2
+
3
+ declare const checkMeetingPasswordRule: Record<string, Rule>;
4
+ export { checkMeetingPasswordRule };