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