@xylink/xy-rtc-sdk 3.10.0-beta.4 → 100.0.0-beta.44

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 (116) hide show
  1. package/README.MD +30 -12
  2. package/build.config.json +10 -0
  3. package/lib/action/index.d.ts +57 -45
  4. package/lib/enum/analyser.d.ts +7 -0
  5. package/lib/enum/client.d.ts +8 -2
  6. package/lib/enum/constraints.d.ts +11 -16
  7. package/lib/enum/device.d.ts +0 -6
  8. package/lib/enum/errorCode.d.ts +5 -2
  9. package/lib/enum/index.d.ts +43 -5
  10. package/lib/enum/polling.d.ts +2 -0
  11. package/lib/feature/customMessage/index.d.ts +29 -0
  12. package/lib/feature/edu/index.d.ts +34 -0
  13. package/lib/feature/edu/index.type.d.ts +29 -0
  14. package/lib/feature/index.d.ts +3 -1
  15. package/lib/feature/{speaker.d.ts → speaker/index.d.ts} +29 -9
  16. package/lib/feature/speaker/index.type.d.ts +17 -0
  17. package/lib/index.d.ts +65 -28
  18. package/lib/interface/baseModule.type.d.ts +9 -0
  19. package/lib/interface/clientInterface.type.d.ts +83 -0
  20. package/lib/interface/contentTrackInterface.type.d.ts +15 -0
  21. package/lib/interface/event.type.d.ts +316 -0
  22. package/lib/interface/peopleTrackInterface.type.d.ts +17 -0
  23. package/lib/main/ability/const.d.ts +4 -1
  24. package/lib/main/ability/index.d.ts +7 -1
  25. package/lib/main/{auth.d.ts → auth/index.d.ts} +29 -19
  26. package/lib/main/client.d.ts +365 -595
  27. package/lib/main/clientBase.d.ts +38 -0
  28. package/lib/main/clientState.d.ts +56 -0
  29. package/lib/main/{deviceManager.d.ts → device/index.d.ts} +45 -13
  30. package/lib/{type/device.d.ts → main/device/index.type.d.ts} +65 -16
  31. package/lib/main/helper/index.d.ts +120 -0
  32. package/lib/main/layout/index.d.ts +118 -105
  33. package/lib/main/layout/index.type.d.ts +270 -0
  34. package/lib/main/layout/polling.d.ts +212 -0
  35. package/lib/main/layout/state.d.ts +163 -0
  36. package/lib/main/layout/template.d.ts +15 -7
  37. package/lib/main/media/index.d.ts +177 -0
  38. package/lib/main/media/index.type.d.ts +9 -0
  39. package/lib/main/meeting/control.d.ts +107 -0
  40. package/lib/main/meeting/control.type.d.ts +24 -0
  41. package/lib/main/{meeting.d.ts → meeting/index.d.ts} +46 -7
  42. package/lib/main/meeting/verify.d.ts +69 -0
  43. package/lib/main/peer.d.ts +120 -41
  44. package/lib/main/plugin/index.d.ts +28 -0
  45. package/lib/{tools/quality.d.ts → main/quality/index.d.ts} +2 -2
  46. package/lib/{tools → main/quality}/quality.worker.d.ts +1 -1
  47. package/lib/main/{qualityManager.d.ts → quality/report.d.ts} +11 -5
  48. package/lib/main/render/index.d.ts +116 -0
  49. package/lib/main/render/index.type.d.ts +24 -0
  50. package/lib/main/{videoManager.d.ts → render/videoManager.d.ts} +78 -28
  51. package/lib/main/render/videoManager.type.d.ts +66 -0
  52. package/lib/main/roster/index.d.ts +39 -0
  53. package/lib/main/server/index.d.ts +79 -0
  54. package/lib/main/server/index.type.d.ts +21 -0
  55. package/lib/main/signal/index.d.ts +15 -0
  56. package/lib/main/socket/index.d.ts +95 -0
  57. package/lib/main/stream/index.d.ts +182 -0
  58. package/lib/main/track/baseTrack.d.ts +178 -0
  59. package/lib/main/track/contentTrack.d.ts +161 -0
  60. package/lib/main/track/customContentTrack.d.ts +18 -0
  61. package/lib/main/track/customVideoAudioTrack.d.ts +18 -0
  62. package/lib/main/track/helper.d.ts +53 -0
  63. package/lib/main/track/videoAudioCapture.d.ts +90 -0
  64. package/lib/main/track/videoAudioTrack.d.ts +243 -0
  65. package/lib/main/vom/index.d.ts +44 -0
  66. package/lib/main/vom/index.type.d.ts +1 -0
  67. package/lib/tools/analyser.d.ts +30 -7
  68. package/lib/tools/analyserManager.d.ts +55 -0
  69. package/lib/tools/dbManager.d.ts +12 -1
  70. package/lib/tools/{browser.d.ts → detectBrowser/index.d.ts} +53 -5
  71. package/lib/tools/detectStream/index.d.ts +84 -0
  72. package/lib/tools/detectStream/index.type.d.ts +56 -0
  73. package/lib/tools/detectTool/index.d.ts +191 -0
  74. package/lib/tools/detectTool/index.type.d.ts +62 -0
  75. package/lib/tools/emitter.d.ts +27 -6
  76. package/lib/tools/enum.d.ts +1 -1
  77. package/lib/tools/httpClient.d.ts +5 -1
  78. package/lib/tools/i18n.d.ts +1 -1
  79. package/lib/tools/index.d.ts +1 -8
  80. package/lib/tools/log/logger.d.ts +41 -21
  81. package/lib/tools/log/logger.worker.d.ts +1 -1
  82. package/lib/tools/log/loggerManager.d.ts +2 -2
  83. package/lib/tools/pressure/index.d.ts +33 -0
  84. package/lib/tools/pressure/index.type.d.ts +22 -0
  85. package/lib/tools/promiseQueue.d.ts +6 -0
  86. package/lib/tools/regex.d.ts +4 -0
  87. package/lib/tools/snapshot.d.ts +1 -1
  88. package/lib/tools/socket.d.ts +12 -2
  89. package/lib/tools/template/index.d.ts +11 -88
  90. package/lib/tools/template/mobile.d.ts +1 -1
  91. package/lib/tools/template/polling.d.ts +8 -0
  92. package/lib/tools/utils.d.ts +25 -16
  93. package/lib/tools/verify.d.ts +7 -0
  94. package/lib/type/ability.d.ts +1 -1
  95. package/lib/type/analyser.d.ts +26 -1
  96. package/lib/type/auth.d.ts +19 -19
  97. package/lib/type/base.d.ts +27 -31
  98. package/lib/type/capture.d.ts +9 -0
  99. package/lib/type/client.d.ts +178 -333
  100. package/lib/type/index.d.ts +22 -2
  101. package/lib/type/layout.d.ts +81 -45
  102. package/lib/type/logger.d.ts +19 -12
  103. package/lib/type/meeting.d.ts +101 -56
  104. package/lib/type/peer.d.ts +65 -1
  105. package/lib/type/polling.d.ts +194 -0
  106. package/lib/type/quality.d.ts +12 -2
  107. package/lib/type/socket.d.ts +0 -18
  108. package/lib/type/stream.d.ts +42 -24
  109. package/lib/type/track.d.ts +131 -0
  110. package/lib/xyrtc.cjs.js +1 -1
  111. package/lib/xyrtc.umd.js +1 -1
  112. package/package.json +32 -52
  113. package/lib/main/clientImplements.d.ts +0 -99
  114. package/lib/main/helper.d.ts +0 -104
  115. package/lib/main/stream.d.ts +0 -418
  116. package/lib/tools/detect.d.ts +0 -44
package/lib/index.d.ts CHANGED
@@ -1,40 +1,77 @@
1
1
  /**
2
2
  * XYLink WebRTC SDK Lib
3
3
  *
4
- * 主入口文件,提供 createClient、createStream、版本等基本信息和方法;
5
- *
6
4
  * @authors Luo-jinghui (luojinghui424@gmail.com)
7
5
  * @date 2019-10-14 18:20:28
8
6
  */
9
- import { IClientConfig, TLocale, ICheckSystemRequirements } from './type';
10
- import DeviceManager from './main/deviceManager';
7
+ import XYRTCClient from './main/client';
11
8
  import Logger from './tools/log/logger';
12
- import Client from './main/client';
13
- import Stream from './main/stream';
14
- import { getVideoInfoByRotation, getSendSupportedCodec, getLayoutRotateInfo, getLayoutItemState, detectLocator } from './main/helper';
15
- import BrowserDetector from './tools/browser';
16
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';
17
+ export * from './main/helper/index';
17
18
  /**
18
- * XYLink WebRTC SDK 操作入口
19
+ * XYLink WebRTC SDK 入口
19
20
  */
20
- interface XYLinkRTC {
21
- version: string;
22
- client: Client | null;
23
- logger: Logger;
24
- create: (config: IClientConfig, logger?: Logger) => {
25
- client: Client;
26
- stream: Stream;
27
- };
28
- checkSupportWebRTC: () => Promise<ICheckSystemRequirements>;
29
- checkSupportMobileWebRTC: () => Promise<ICheckSystemRequirements>;
30
- checkSupportShareContent: () => boolean;
31
- setLocale: (language: TLocale) => void;
32
- setOutputAudioDevice: (element: HTMLMediaElement, outputValue: string) => Promise<void>;
33
- render: void;
21
+ export default class XYRTC {
22
+ /**
23
+ * 获取小鱼易连Web SDK的版本和构建时间
24
+ */
25
+ static version: string;
26
+ /**
27
+ * 日志模块
28
+ */
29
+ static logger: Logger;
30
+ /**
31
+ * 创建Logger模块
32
+ */
33
+ static createLogger: (config: import("./type/index").ILoggerConfig) => Logger;
34
+ /**
35
+ * 日志管理器,可以同时获取多个日志实例内容
36
+ */
37
+ static logManager: LogManager;
38
+ /**
39
+ * 创建小鱼易连 XYClient 模块
40
+ *
41
+ * @param { IClientConfig } config - XYRTCClient配置参数
42
+ * @param { Logger? } logger - 可选配置 | Logger模块,默认内部会创建,如果是多实例,需要外部通过createLogger创建Logger并传递给XYRTC
43
+ * @returns { XYRTCClient } - 返回 XYRTCClient 实例 XYClient模块
44
+ */
45
+ static createClient(config: IClientConfig, logger?: Logger): XYRTCClient;
46
+ /**
47
+ * 设置SDK国际化语言
48
+ *
49
+ * @param { TLocale } language - 国际化语言
50
+ */
51
+ static setLocale(language: TLocale): void;
52
+ /**
53
+ * 检测浏览器是否支持WebRTC
54
+ *
55
+ * @returns { Promise<ICheckSystemRequirements> } - 检测结果
56
+ */
57
+ static checkSupportWebRTC(): Promise<ICheckSystemRequirements>;
58
+ /**
59
+ * 检测浏览器是否支持共享内容能力
60
+ *
61
+ * @returns { boolean } 是否支持
62
+ */
63
+ static checkSupportShareContent(): Promise<boolean>;
64
+ static render: void;
34
65
  }
35
- declare const XYRTC: XYLinkRTC;
36
- export default XYRTC;
37
- export { Client, Stream, Logger, LogManager, DeviceManager, getLayoutItemState, getVideoInfoByRotation, getLayoutRotateInfo, getSendSupportedCodec, detectLocator };
38
- export * from './type';
66
+ /**
67
+ * 导出 MODULES
68
+ */
69
+ export { XYRTCClient, VideoAudioTrack, ContentTrack, Logger, LogManager, XYDetector };
70
+ /**
71
+ * 导出 TYPE 类型定义
72
+ */
73
+ export * from './type/index';
74
+ /**
75
+ * 导出错误码
76
+ */
39
77
  export { ERROR_CODE } from './enum/errorCode';
40
- export { BrowserDetector };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * XYLink WebRTC SDK Base Lib Interface
3
+ *
4
+ * Created at : 2024-04-22 16:01:57
5
+ * Last modified : 2024-06-20 16:31:51
6
+ */
7
+ export interface XYBaseModule {
8
+ destroy(): void;
9
+ }
@@ -0,0 +1,83 @@
1
+ /**
2
+ * XYLink WebRTC SDK Interface
3
+ *
4
+ * Created at : 2024-04-22 16:01:57
5
+ * Last modified : 2024-06-20 16:32:26
6
+ */
7
+ import VideoAudioTrack from '../main/track/videoAudioTrack';
8
+ import ContentTrack from '../main/track/contentTrack';
9
+ import { AnalyserConfig, ICall, IConference, IConfMgmtUrl, IFeatureConfigKey, IFeatureConfigValue, IGetConferenceParams, ILoginExtAccount, ILoginWidthAuthCode, IMackCall, IMode, InviteInfo, IReqInfo, IReturnResult, IVideoAudioType, IVideoProfile, Key, LayoutConfig, LayoutOrientationType, LocalViewParams, LoginExtTokenParams, LoginTokenInfo, LoginXYAccountParams, MEETING_DIRECTION, SnapshotParams, SnapshotResult, TLocalLanguage } from '../type/index';
10
+ import { AudioAnalyser } from '../tools/analyser';
11
+ export interface XYClientIF {
12
+ createVideoAudioTrack(): Promise<VideoAudioTrack>;
13
+ createContentTrack(): Promise<ContentTrack>;
14
+ getVideoStream(rosterId?: string): MediaStream | null;
15
+ getAudioStream(rosterId?: string): MediaStream | null;
16
+ getAudioAnalyser(id?: string, config?: AnalyserConfig): IReturnResult | AudioAnalyser | null;
17
+ removeAudioAnalyser(id?: string): void | IReturnResult;
18
+ registerPlugins(plugins: any[]): IReturnResult | Promise<IReturnResult>;
19
+ setLayoutOrientation(orientation: LayoutOrientationType): Promise<IReturnResult>;
20
+ loginXYlinkAccount(userName: string, password: string): Promise<IReturnResult>;
21
+ loginExternalAccount(params: ILoginExtAccount): Promise<IReturnResult>;
22
+ loginXYAccount(params: LoginXYAccountParams): Promise<IReturnResult>;
23
+ loginExtToken(params: LoginExtTokenParams): Promise<IReturnResult>;
24
+ loginWithAuthCode(params: ILoginWidthAuthCode): Promise<IReturnResult>;
25
+ switchFeatureConfig(key: IFeatureConfigKey, value: IFeatureConfigValue<IFeatureConfigKey>): Promise<IReturnResult>;
26
+ setVideoProfile(direction: MEETING_DIRECTION, profile: IVideoProfile): Promise<void>;
27
+ getConfMgmtUrl(): Promise<IConfMgmtUrl | null>;
28
+ setHideLocalView(state: boolean): Promise<{
29
+ status: boolean;
30
+ }>;
31
+ setVideoRenderer(id: string, wrapEleId: string): void;
32
+ setSlaveVideoRenderer(id: string, wrapEleId: string): void;
33
+ removeVideoRenderer(id: string): void;
34
+ removeSlaveVideoRenderer(rosterId?: string, viewId?: string): void;
35
+ playLocalVideo(): Promise<void>;
36
+ playVideo(idList?: string[]): Promise<void>;
37
+ playAudio(): Promise<void>;
38
+ setAudioRenderer(streamId: string, ele: HTMLAudioElement): Promise<void>;
39
+ removeAudioRender(key: string): void;
40
+ getSnapshot(params: SnapshotParams): Promise<SnapshotResult>;
41
+ setLocalViewParams(params: LocalViewParams): Promise<IReturnResult>;
42
+ setLayoutConfig(config: LayoutConfig): void;
43
+ switchLayout(templateMode?: IMode): Promise<IMode>;
44
+ startMeetingFocusView(id: string): Promise<IReturnResult>;
45
+ stopMeetingFocusView(id: string): Promise<IReturnResult>;
46
+ setFocusView(id: string): Promise<string>;
47
+ setPageInfo(currentPage?: number): Promise<IReturnResult>;
48
+ setLoginTokenInfo(info: LoginTokenInfo): Promise<IReturnResult>;
49
+ checkMeetingNumber(params: ICall): Promise<IReturnResult>;
50
+ checkMeetingPassword(confNumber: string, password: string): Promise<IReturnResult>;
51
+ makeCall(params: IMackCall): Promise<IReturnResult>;
52
+ publish(track: VideoAudioTrack | ContentTrack): void;
53
+ getConference(params: IGetConferenceParams): Promise<IConference>;
54
+ muteAudio(): Promise<IVideoAudioType>;
55
+ muteVideo(): Promise<IVideoAudioType>;
56
+ unmuteAudio(): Promise<IVideoAudioType>;
57
+ unmuteVideo(): Promise<IVideoAudioType>;
58
+ onHandUp(): Promise<boolean>;
59
+ onHandDown(): Promise<boolean>;
60
+ onMute(): Promise<boolean>;
61
+ nextPollingPage(): void;
62
+ switchDebug(status: boolean): Promise<boolean>;
63
+ requestNewLayout(reqList: IReqInfo[], maxViewCountPerPage: number, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
64
+ forceFullScreen(id?: string): Promise<string>;
65
+ startMonitor(uriList?: string[]): void;
66
+ stopMonitor(uriList?: string[]): void;
67
+ subscribeBulkRoster(): Promise<IReturnResult>;
68
+ startTranslation(): Promise<IReturnResult>;
69
+ stopTranslation(): Promise<IReturnResult>;
70
+ setTranslationLanguage(language: TLocalLanguage): Promise<IReturnResult>;
71
+ startCloudRecord(): Promise<IReturnResult>;
72
+ stopCloudRecord(): Promise<IReturnResult>;
73
+ bindTrackGroup(trackType: 'audio' | 'video', mediagroupId: number): true | IReturnResult;
74
+ startMonitorGroup(mediagroupIds: Key[]): IReturnResult;
75
+ stopMonitorGroup(mediagroupIds: Key[]): IReturnResult;
76
+ rename(newName: string): Promise<IReturnResult | undefined>;
77
+ getMeetingInviteInfo(): Promise<InviteInfo>;
78
+ signIn(questionnaireId: string): Promise<IReturnResult>;
79
+ verifyControlPassword(pwd: string): Promise<IReturnResult>;
80
+ endAllMeeting(): Promise<IReturnResult>;
81
+ destroy(reason?: string, blockSendSocket?: boolean): Promise<boolean>;
82
+ off(key: string): void;
83
+ }
@@ -0,0 +1,15 @@
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 { ContentTrackConfig, IReturnResult, ISource } from '../type/index';
8
+ export interface XYContentTrackIF {
9
+ capture(config?: ContentTrackConfig): Promise<IReturnResult>;
10
+ pause(): Promise<IReturnResult>;
11
+ resume(): Promise<IReturnResult>;
12
+ getElectronContentSources(desktopCapturer: any, types?: any): Promise<ISource[] | any>;
13
+ createElectronContentStream(selectedSourceId: string): Promise<IReturnResult>;
14
+ close(): void;
15
+ }
@@ -0,0 +1,316 @@
1
+ /**
2
+ * XY WebRTC SDK Event Keys
3
+ *
4
+ * Created at : 2024-06-07 11:00:49
5
+ * Last modified : 2024-06-07 18:55:00
6
+ */
7
+ /**
8
+ * SDK客户端事件Key枚举
9
+ *
10
+ * @since 1.0.0
11
+ */
12
+ export declare enum XYClientEventKey {
13
+ /**
14
+ * ==================分组:会控事件==================
15
+ */
16
+ /**
17
+ * 清除举手事件
18
+ */
19
+ CANCEL_HANDUP = "cancel-handup",
20
+ /**
21
+ * 焦点画面事件
22
+ *
23
+ * @since 4.0.0
24
+ */
25
+ FOCUS_VIEW = "focus-view",
26
+ /**
27
+ * 会控互动工具相关数据, 签到事件
28
+ */
29
+ INTERACTIVE_TOOL_INFO = "interactiveToolInfo",
30
+ /**
31
+ * 会控事件
32
+ */
33
+ MEETING_CONTROL = "meeting-control",
34
+ /**
35
+ * 会控上报开启/关闭摄像头事件
36
+ */
37
+ MEETING_CONTROL_VIDEO = "meeting-control-video",
38
+ /**
39
+ * 处理会控联席主持人/主持人/改名权限变更事件
40
+ */
41
+ NOTIFICATION = "notification",
42
+ /**
43
+ * 等候室事件
44
+ */
45
+ ONHOLD = "onhold",
46
+ /**
47
+ * 点名/字幕事件
48
+ */
49
+ SUB_TITLE = "sub-title",
50
+ /**
51
+ * ==================分组:会议状态/信息==================
52
+ */
53
+ /**
54
+ * 呼叫状态事件
55
+ */
56
+ CALL_STATUS = "call-status",
57
+ /**
58
+ * 云会议室信息
59
+ */
60
+ CONFERENCE_INFO = "conference-info",
61
+ /**
62
+ * 挂断会议事件
63
+ */
64
+ DISCONNECTED = "disconnected",
65
+ /**
66
+ * 企业配置信息(头像配置、禁用语音转写英文翻译)
67
+ */
68
+ ENTERPRISE_CONFIG = "enterprise-config",
69
+ /**
70
+ * 轮询状态事件
71
+ */
72
+ LAYOUT_STATE = "layout-state",
73
+ /**
74
+ * 媒体迁会事件
75
+ */
76
+ MEDIA_CHANGED_MIGRATE = "media_changed_migrate",
77
+ /**
78
+ * 用户信息和个人云会议室信息
79
+ */
80
+ USER_INFO = "user-info",
81
+ /**
82
+ * ==================分组:拉流/布局==================
83
+ */
84
+ /**
85
+ * 会议状态/人员变动事件
86
+ */
87
+ CONF_CHANGE_INFO = "conf-change-info",
88
+ /**
89
+ * 会议分享Content信息事件
90
+ */
91
+ CONTENT = "content",
92
+ /**
93
+ * 布局容器尺寸变化事件
94
+ */
95
+ CONTAINER_RESIZE = "container-resize",
96
+ /**
97
+ * 参会人员强制全屏事件
98
+ */
99
+ FORCE_FULL_SCREEN = "force-full-screen",
100
+ /**
101
+ * 参会者布局列表事件
102
+ */
103
+ LAYOUT = "layout",
104
+ /**
105
+ * 分页事件
106
+ */
107
+ PAGE_INFO = "page-info",
108
+ /**
109
+ * 参会者视频画面旋转信息
110
+ */
111
+ ROTATION_CHANGE = "rotation-change",
112
+ /**
113
+ * 布局容器尺寸和位置信息
114
+ */
115
+ SCREEN_INFO = "screen-info",
116
+ /**
117
+ * 当前布局模型事件
118
+ */
119
+ TEMPLATE_MODE = "template-mode",
120
+ /**
121
+ * ==================分组:媒体==================
122
+ */
123
+ /**
124
+ * 音频鬼道事件
125
+ */
126
+ AUDIO_TRACK = "audio-track",
127
+ /**
128
+ * 订阅Roster事件(参会者数据)
129
+ */
130
+ BULK_ROSTER = "bulkRoster",
131
+ /**
132
+ * 参会者出入会事件
133
+ */
134
+ IN_OUT_REMINDER = "in-out-reminder",
135
+ /**
136
+ * 本地网络质量等级
137
+ */
138
+ NETWORK_LEVEL = "networkLevel",
139
+ /**
140
+ * 远端参会者网络等级
141
+ */
142
+ NETWORK_PARAMETER = "networkParameter",
143
+ /**
144
+ * 会议总人数事件
145
+ */
146
+ PARTICIPANTS_COUNT = "participants-count",
147
+ /**
148
+ * 参会者列表事件(仅上报前20路)
149
+ */
150
+ ROSTER = "roster",
151
+ /**
152
+ * 语音激励人员信息
153
+ */
154
+ SPEAKER_INFO = "speaker-info",
155
+ /**
156
+ * 实时讲话人信息(最多3三路数据)
157
+ */
158
+ SPEAKERS_INFO = "speakers-info",
159
+ /**
160
+ * 同传字幕
161
+ */
162
+ TRANSLATION_CONTENT = "translation-content",
163
+ /**
164
+ * 视频轨道事件
165
+ */
166
+ VIDEO_TRACK = "video-track",
167
+ /**
168
+ * ==================分组:设备==================
169
+ */
170
+ /**
171
+ * 本地麦克风状态事件
172
+ */
173
+ AUDIO_STATUS = "audio-status",
174
+ /**
175
+ * 本地摄像头状态事件
176
+ */
177
+ VIDEO_STATUS = "video-status",
178
+ /**
179
+ * ==================分组:会议调度==================
180
+ */
181
+ /**
182
+ * 多分组通道事件
183
+ */
184
+ MULTI_GROUP_INFO = "multi-group-info",
185
+ /**
186
+ * 调度成功事件
187
+ */
188
+ START_MONITOR_REPORT = "start-monitor-report",
189
+ /**
190
+ * 停止调度事件
191
+ */
192
+ STOP_MONITOR_REPORT = "stop-monitor-report",
193
+ /**
194
+ * ==================分组:录制==================
195
+ */
196
+ /**
197
+ * 本地录制结果上报事件
198
+ */
199
+ RECORDING_STATE_CHANGED = "recording-state-changed",
200
+ /**
201
+ * 上报远端录制状态
202
+ */
203
+ RECORD_STATUS_NOTIFICATION = "record-status-notification",
204
+ /**
205
+ * 录制权限事件
206
+ */
207
+ RECORD_PERMISSION = "record-permission",
208
+ /**
209
+ * ==================分组:其他==================
210
+ */
211
+ /**
212
+ * 接收自定义消息事件
213
+ */
214
+ CUSTOM_MESSAGE_RECV = "custom-message-recv",
215
+ /**
216
+ * 错误事件
217
+ */
218
+ ERROR = "error",
219
+ /**
220
+ * 会议质量统计事件
221
+ */
222
+ MEETING_STATS = "meeting-stats",
223
+ /**
224
+ * 播放音视频失败事件
225
+ */
226
+ PLAY_FAILED = "play-failed",
227
+ /**
228
+ * Socket关闭事件
229
+ */
230
+ SOCKET_CLOSE = "socket-close",
231
+ /**
232
+ * Socket错误事件
233
+ */
234
+ SOCKET_ERROR = "socket-error",
235
+ /**
236
+ * Socket消息
237
+ */
238
+ SOCKET_MESSAGE = "socket-message",
239
+ /**
240
+ * Socket打开事件
241
+ */
242
+ SOCKET_OPEN = "socket-open",
243
+ /**
244
+ * Socket重连事件
245
+ */
246
+ SOCKET_RECONNECT = "socket-reconnect",
247
+ /**
248
+ * Socket超时事件
249
+ */
250
+ SOCKET_TIMEOUT = "socket-timeout"
251
+ }
252
+ /**
253
+ * 自定义Track事件Key枚举
254
+ */
255
+ export declare enum XYTrackEventKey {
256
+ /**
257
+ * 设备列表
258
+ */
259
+ DEVICE = "device",
260
+ /**
261
+ * 设备权限
262
+ */
263
+ PERMISSION = "permission",
264
+ /**
265
+ * 结束分享屏幕事件
266
+ */
267
+ STOP_SHARE_CONTENT = "stop-share-content",
268
+ /**
269
+ * 开始分享屏幕事件
270
+ */
271
+ START_SHARE_CONTENT = "start-share-content",
272
+ /**
273
+ * Track错误事件
274
+ */
275
+ TRACK_ERROR = "track-error"
276
+ }
277
+ /**
278
+ * 设备事件Key枚举
279
+ */
280
+ export declare enum XYDeviceEventKey {
281
+ DEVICE = "device",
282
+ PERMISSION = "permission"
283
+ }
284
+ /**
285
+ * Socket事件
286
+ */
287
+ export declare enum XYSocketEventKey {
288
+ /**
289
+ * Socket连接关闭
290
+ */
291
+ CLOSE = "close",
292
+ /**
293
+ * Socket连接错误
294
+ */
295
+ ERROR = "error",
296
+ /**
297
+ * Socket接收到消息
298
+ */
299
+ MESSAGE = "message",
300
+ /**
301
+ * Socket连接成功
302
+ */
303
+ OPEN = "open",
304
+ /**
305
+ * Socket重连
306
+ */
307
+ RECONNECT = "reconnect",
308
+ /**
309
+ * Socket连接超时
310
+ */
311
+ TIMEOUT = "timeout",
312
+ /**
313
+ * Token失效
314
+ */
315
+ TOKEN_INVALID = "TOKEN_INVALID"
316
+ }
@@ -0,0 +1,17 @@
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
+ import { DEVICE_KIND, IFacingMode, IProcessTrack, IReturnResult, PeopleTrackConfig, SwitchDeviceConfig } from '../type/index';
9
+ export interface XYPeopleTrackIF {
10
+ capture(config?: PeopleTrackConfig): Promise<any>;
11
+ connect(processor: any): VideoAudioTrack;
12
+ processorDestination(processTrack: IProcessTrack): Promise<MediaStream>;
13
+ switchDevice(type: DEVICE_KIND, deviceId: string, config?: SwitchDeviceConfig): Promise<IReturnResult>;
14
+ switchCamera(facingMode?: IFacingMode): Promise<IFacingMode>;
15
+ getAudioLevel(): Promise<number>;
16
+ close(): void;
17
+ }
@@ -1,2 +1,5 @@
1
- import { LocalAbility } from '../../type';
1
+ import { LocalAbility } from '../../type/index';
2
+ /**
3
+ * 本地能力集
4
+ */
2
5
  export declare const LOCAL_ABILITIES: LocalAbility;
@@ -1,4 +1,10 @@
1
- import { AbilityResult } from '../../type';
1
+ /**
2
+ * 能力集
3
+ *
4
+ * Created at : 2024-05-13 14:47:25
5
+ * Last modified : 2024-05-13 14:47:25
6
+ */
7
+ import { AbilityResult } from '../../type/index';
2
8
  import Client from '../client';
3
9
  declare class Ability {
4
10
  private abilityResult;
@@ -1,28 +1,32 @@
1
1
  /**
2
2
  * 登录模块
3
3
  */
4
- import { ILoginExtAccount, ISdkUserInfo, ILoginInfo, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams } from '../type';
5
- import Client from './client';
4
+ import { ILoginExtAccount, ISdkUserInfo, ILoginInfo, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, LoginTokenInfo, IReturnResult } from '../../type/index';
5
+ import Client from '../client';
6
6
  declare class Auth {
7
7
  private logger;
8
8
  private action;
9
9
  private loginInfo;
10
10
  private extId;
11
+ private isLoggedIn;
11
12
  constructor(client: Client);
13
+ getIsLoggedIn(): boolean;
12
14
  getLoginInfo(): ILoginInfo;
13
15
  setLoginInfo(loginInfo: ILoginInfo): void;
16
+ destroy(): void;
17
+ private preLoginTasks;
14
18
  /**
15
19
  * 第三方账号登录 - 旧方法
16
20
  *
17
21
  * @public
18
22
  * @param { ILoginExtAccount } params 参数
19
- * @param { string } params.displayName 用户名称
20
- * @param { string } params.extId 企业id
21
- * @param { string? } params.extUserId 三方用户ID
22
- * @param { boolean? } params.tempUser 是否是临时账号 v3.9.2新增
23
+ * @param { string } params.displayName - 必填,用户名称
24
+ * @param { string } params.extId - 必填,企业id
25
+ * @param { string? } params.extUserId - 可选,三方用户ID
26
+ * @param { boolean? } params.tempUser - 可选,是否是临时账号 v3.9.2新增
23
27
  * @return
24
28
  */
25
- loginExternalAccount(params: ILoginExtAccount): Promise<import("../type").IReturnResult>;
29
+ loginExternalAccount(params: ILoginExtAccount): Promise<IReturnResult>;
26
30
  /**
27
31
  * 授权码登录
28
32
  *
@@ -35,7 +39,7 @@ declare class Auth {
35
39
  * @param {string} params.channelId 渠道id
36
40
  * @return
37
41
  */
38
- loginWithAuthCode(params: ILoginWidthAuthCode): Promise<import("../type").IReturnResult>;
42
+ loginWithAuthCode(params: ILoginWidthAuthCode): Promise<IReturnResult>;
39
43
  /**
40
44
  * 登录
41
45
  *
@@ -43,28 +47,41 @@ declare class Auth {
43
47
  * @param { ILoginExtAccount } params
44
48
  * @return
45
49
  */
46
- login(sdkUserInfo: ISdkUserInfo, params?: ILoginExtAccount): Promise<import("../type").IReturnResult>;
50
+ login(sdkUserInfo: ISdkUserInfo, params?: ILoginExtAccount): Promise<IReturnResult>;
47
51
  /**
48
52
  * 三方用户统一认证-小鱼账号登录
49
53
  *
50
54
  * @param { LoginXYAccountParams } params 参数
51
55
  * @return
52
56
  */
53
- loginXYAccount(params: LoginXYAccountParams): Promise<import("../type").IReturnResult>;
57
+ loginXYAccount(params: LoginXYAccountParams): Promise<IReturnResult>;
54
58
  /**
55
59
  * 三方用户统一认证-三方id登录
56
60
  *
57
61
  * @param { ILoginExtAccount } params 参数
58
62
  * @return
59
63
  */
60
- loginExtUserId(params: ILoginExtAccount): Promise<import("../type").IReturnResult>;
64
+ loginExtUserId(params: ILoginExtAccount): Promise<IReturnResult>;
61
65
  /**
62
66
  * 三方用户统一认证-token登录
63
67
  *
64
68
  * @param { LoginExtTokenParams } params 参数
65
69
  * @return
66
70
  */
67
- loginExtToken(params: LoginExtTokenParams): Promise<import("../type").IReturnResult>;
71
+ loginExtToken(params: LoginExtTokenParams): Promise<IReturnResult>;
72
+ /**
73
+ * 无登录模式调用,需要在调用makeCall前配置,用于网关签名计算和接口安全校验
74
+ *
75
+ * @param { LoginTokenInfo } info - 登录token、clientId等相关信息
76
+ */
77
+ setLoginTokenInfo(info: LoginTokenInfo): Promise<IReturnResult>;
78
+ /**
79
+ * 根据Token获取用户信息
80
+ *
81
+ * @param { string } token - token信息
82
+ * @returns { Promise<IReturnResult> } - 结果
83
+ */
84
+ getUserInfo(token: string): Promise<IReturnResult>;
68
85
  /**
69
86
  * 统一处理登录后的信息
70
87
  *
@@ -73,13 +90,6 @@ declare class Auth {
73
90
  * @returns
74
91
  */
75
92
  private handleLoginResult;
76
- /**
77
- * 校验必填参数
78
- *
79
- * @param { Record<string, any> | any } requiredField 校验参数
80
- * @returns
81
- */
82
- private verifyRequiredField;
83
93
  /**
84
94
  * 校验三方用户ID
85
95
  *