@xylink/xy-rtc-sdk 4.0.0 → 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.
Files changed (168) hide show
  1. package/{README.MD → README.md} +1 -1
  2. package/action/ability.d.ts +151 -0
  3. package/action/api.d.ts +252 -0
  4. package/action/auth.d.ts +134 -0
  5. package/action/base.d.ts +13 -0
  6. package/action/config.d.ts +63 -0
  7. package/action/control.d.ts +101 -0
  8. package/action/enterprise.d.ts +66 -0
  9. package/{lib/tools/httpClient.d.ts → action/http.d.ts} +19 -11
  10. package/action/index.d.ts +92 -0
  11. package/action/index.type.d.ts +30 -0
  12. package/action/log.d.ts +17 -0
  13. package/action/meeting.d.ts +107 -0
  14. package/{lib/enum → enum}/client.d.ts +1 -6
  15. package/{lib/enum → enum}/constraints.d.ts +1 -6
  16. package/{lib/enum → enum}/device.d.ts +6 -0
  17. package/{lib/enum/errorCode.d.ts → enum/errorCode/common.d.ts} +1 -22
  18. package/enum/errorCode/index.d.ts +6 -0
  19. package/enum/errorCode/server.d.ts +10 -0
  20. package/enum/errorCode/signal.d.ts +15 -0
  21. package/{lib/enum → enum}/index.d.ts +11 -8
  22. package/enum/meeting.d.ts +15 -0
  23. package/{lib/enum → enum}/polling.d.ts +1 -0
  24. package/feature/artboard/index.d.ts +139 -0
  25. package/feature/artboard/index.type.d.ts +264 -0
  26. package/{lib/feature → feature}/customMessage/index.d.ts +3 -8
  27. package/{lib/feature → feature}/edu/index.d.ts +2 -1
  28. package/{lib/feature → feature}/edu/index.type.d.ts +1 -0
  29. package/feature/im/index.d.ts +89 -0
  30. package/feature/im/index.type.d.ts +30 -0
  31. package/feature/index.d.ts +29 -0
  32. package/feature/query/index.d.ts +36 -0
  33. package/feature/query/index.type.d.ts +61 -0
  34. package/{lib/feature → feature}/speaker/index.d.ts +5 -10
  35. package/{lib/feature → feature}/speaker/index.type.d.ts +1 -0
  36. package/{lib/index.d.ts → index.d.ts} +19 -21
  37. package/{lib/interface → interface}/clientInterface.type.d.ts +24 -11
  38. package/{lib/interface → interface}/contentTrackInterface.type.d.ts +1 -6
  39. package/{lib/interface → interface}/event.type.d.ts +60 -1
  40. package/{lib/interface → interface}/videoAudioTrackInterface.type.d.ts +2 -7
  41. package/{lib/main → main}/ability/const.d.ts +1 -0
  42. package/{lib/main → main}/ability/index.d.ts +5 -10
  43. package/main/auth/index.d.ts +160 -0
  44. package/main/auth/index.type.d.ts +63 -0
  45. package/main/client/clientBase.d.ts +60 -0
  46. package/main/client/clientState.d.ts +36 -0
  47. package/{lib/main/client.d.ts → main/client/index.d.ts} +253 -79
  48. package/main/client/index.type.d.ts +42 -0
  49. package/{lib/main → main}/device/index.d.ts +5 -15
  50. package/{lib/tools → main/helper}/i18n.d.ts +2 -1
  51. package/{lib/main → main}/helper/index.d.ts +9 -7
  52. package/{lib/main → main}/layout/index.d.ts +7 -16
  53. package/{lib/main → main}/layout/index.type.d.ts +10 -9
  54. package/{lib/main → main}/layout/polling.d.ts +3 -11
  55. package/{lib/main → main}/layout/state.d.ts +4 -10
  56. package/{lib/tools → main/layout}/template/index.d.ts +25 -7
  57. package/{lib/main/layout/template.d.ts → main/layout/template/manager.d.ts} +2 -1
  58. package/main/layout/template/mobile.d.ts +4 -0
  59. package/main/layout/template/polling.d.ts +3 -0
  60. package/{lib/main → main}/media/index.d.ts +13 -11
  61. package/{lib/main → main}/media/index.type.d.ts +1 -0
  62. package/{lib/main → main}/meeting/control.d.ts +20 -1
  63. package/{lib/main → main}/meeting/control.type.d.ts +1 -0
  64. package/{lib/main → main}/meeting/index.d.ts +39 -32
  65. package/main/meeting/index.type.d.ts +43 -0
  66. package/{lib/main → main}/meeting/verify.d.ts +2 -7
  67. package/{lib/main/peer.d.ts → main/peer/index.d.ts} +30 -25
  68. package/main/peer/index.type.d.ts +10 -0
  69. package/{lib/main → main}/plugin/index.d.ts +2 -7
  70. package/{lib/main → main}/quality/index.d.ts +1 -6
  71. package/{lib/main → main}/quality/quality.worker.d.ts +1 -4
  72. package/{lib/main → main}/quality/report.d.ts +2 -1
  73. package/{lib/main → main}/render/index.d.ts +4 -9
  74. package/{lib/main → main}/render/index.type.d.ts +2 -7
  75. package/{lib/main → main}/render/videoManager.d.ts +2 -7
  76. package/{lib/main → main}/roster/index.d.ts +9 -9
  77. package/{lib/main → main}/server/index.d.ts +73 -4
  78. package/main/server/index.type.d.ts +53 -0
  79. package/{lib/main → main}/signal/index.d.ts +2 -1
  80. package/{lib/main → main}/socket/index.d.ts +6 -12
  81. package/{lib/main → main}/stream/index.d.ts +17 -21
  82. package/{lib/main → main}/track/baseTrack.d.ts +6 -14
  83. package/{lib/main → main}/track/contentTrack.d.ts +4 -12
  84. package/main/track/customContentTrack.d.ts +10 -0
  85. package/main/track/customVideoAudioTrack.d.ts +10 -0
  86. package/{lib/main → main}/track/helper.d.ts +13 -1
  87. package/{lib/main → main}/track/videoAudioCapture.d.ts +2 -10
  88. package/{lib/main → main}/track/videoAudioTrack.d.ts +13 -15
  89. package/{lib/main → main}/vom/index.d.ts +2 -7
  90. package/package.json +26 -111
  91. package/{lib/tools/analyser.d.ts → tools/analyser/index.d.ts} +2 -9
  92. package/{lib/tools/analyserManager.d.ts → tools/analyser/manager.d.ts} +4 -13
  93. package/{lib/tools → tools}/config.d.ts +3 -10
  94. package/tools/data/list.d.ts +87 -0
  95. package/tools/data/map.d.ts +17 -0
  96. package/{lib/tools/detectBrowser/index.d.ts → tools/detector/browser.d.ts} +3 -3
  97. package/{lib/tools/detectTool → tools/detector}/index.d.ts +3 -7
  98. package/{lib/tools/detectStream/index.d.ts → tools/detector/stream.d.ts} +2 -9
  99. package/{lib/tools → tools}/emitter.d.ts +9 -3
  100. package/tools/frame/index.d.ts +36 -0
  101. package/tools/frame/index.type.d.ts +1 -0
  102. package/tools/index.d.ts +72 -0
  103. package/{lib/tools/dbManager.d.ts → tools/log/db.d.ts} +8 -14
  104. package/{lib/tools → tools}/log/logger.d.ts +6 -9
  105. package/tools/log/logger.worker.d.ts +10 -0
  106. package/{lib/tools → tools}/log/loggerManager.d.ts +3 -3
  107. package/tools/log/utils.d.ts +6 -0
  108. package/{lib/tools → tools}/pressure/index.d.ts +2 -9
  109. package/{lib/tools/promiseQueue.d.ts → tools/queue/async.d.ts} +3 -9
  110. package/tools/queue/queue.type.d.ts +10 -0
  111. package/{lib/tools/queue.d.ts → tools/queue/sync.d.ts} +3 -9
  112. package/{lib/tools → tools}/resize.d.ts +3 -4
  113. package/{lib/tools/snapshot.d.ts → tools/snapshot/index.d.ts} +3 -11
  114. package/tools/snapshot/index.type.d.ts +38 -0
  115. package/{lib/tools → tools/socket}/socket.d.ts +6 -10
  116. package/tools/socket/socketManager.d.ts +32 -0
  117. package/tools/store.d.ts +47 -0
  118. package/tools/utils.d.ts +162 -0
  119. package/{lib/tools → tools}/verify.d.ts +1 -1
  120. package/tools/window.d.ts +31 -0
  121. package/{lib/type → type}/ability.d.ts +3 -1
  122. package/{lib/type → type}/analyser.d.ts +1 -8
  123. package/{lib/type → type}/auth.d.ts +34 -0
  124. package/{lib/type → type}/base.d.ts +43 -11
  125. package/{lib/type → type}/capture.d.ts +1 -0
  126. package/{lib/type → type}/client.d.ts +65 -70
  127. package/{lib/type → type}/index.d.ts +5 -3
  128. package/{lib/type → type}/layout.d.ts +15 -1
  129. package/{lib/type → type}/logger.d.ts +1 -6
  130. package/{lib/type → type}/meeting.d.ts +105 -15
  131. package/{lib/type → type}/quality.d.ts +2 -7
  132. package/{lib/type → type}/stream.d.ts +4 -5
  133. package/{lib/type → type}/track.d.ts +1 -9
  134. package/xyrtc.js +23212 -0
  135. package/lib/action/index.d.ts +0 -415
  136. package/lib/enum/meeting.d.ts +0 -4
  137. package/lib/feature/index.d.ts +0 -3
  138. package/lib/main/auth/index.d.ts +0 -101
  139. package/lib/main/clientBase.d.ts +0 -40
  140. package/lib/main/clientState.d.ts +0 -56
  141. package/lib/main/server/index.type.d.ts +0 -21
  142. package/lib/main/track/customContentTrack.d.ts +0 -18
  143. package/lib/main/track/customVideoAudioTrack.d.ts +0 -18
  144. package/lib/tools/enum.d.ts +0 -6
  145. package/lib/tools/index.d.ts +0 -8
  146. package/lib/tools/log/logger.worker.d.ts +0 -13
  147. package/lib/tools/regex.d.ts +0 -4
  148. package/lib/tools/store.d.ts +0 -15
  149. package/lib/tools/template/mobile.d.ts +0 -9
  150. package/lib/tools/template/polling.d.ts +0 -8
  151. package/lib/tools/utils.d.ts +0 -97
  152. package/lib/xyrtc.cjs.js +0 -1
  153. package/lib/xyrtc.umd.js +0 -1
  154. /package/{lib/enum → enum}/analyser.d.ts +0 -0
  155. /package/{lib/enum → enum}/i18n.d.ts +0 -0
  156. /package/{lib/interface → interface}/baseModule.type.d.ts +0 -0
  157. /package/{lib/main → main}/device/index.type.d.ts +0 -0
  158. /package/{lib/main → main}/helper/index.type.d.ts +0 -0
  159. /package/{lib/main → main}/meeting/verify.type.d.ts +0 -0
  160. /package/{lib/main → main}/render/videoManager.type.d.ts +0 -0
  161. /package/{lib/main → main}/vom/index.type.d.ts +0 -0
  162. /package/{lib/tools/detectTool → tools/detector}/index.type.d.ts +0 -0
  163. /package/{lib/tools/detectStream/index.type.d.ts → tools/detector/stream.type.d.ts} +0 -0
  164. /package/{lib/tools → tools}/pressure/index.type.d.ts +0 -0
  165. /package/{lib/type → type}/action.d.ts +0 -0
  166. /package/{lib/type → type}/peer.d.ts +0 -0
  167. /package/{lib/type → type}/polling.d.ts +0 -0
  168. /package/{lib/type → type}/socket.d.ts +0 -0
@@ -1,16 +1,11 @@
1
+ import { default as ContentTrack } from '../track/contentTrack';
2
+ import { default as VideoAudioTrack } from '../track/videoAudioTrack';
3
+ import { default as Logger } from '../../tools/log/logger';
4
+ import { default as Client } from '../client';
5
+ import { IStreamSender, ICandidate, PushType, ISenderMap, XYConnectState } from '../../type/index';
6
+
1
7
  /**
2
- * XYLink WebRTC PeerConnection Manager Lib
3
- *
4
- * @authors Luo-jinghui (luojinghui424@gmail.com)
5
- * @date 2019-10-25 18:53:01
6
- */
7
- import { IStreamSender, ICandidate, PushType, ISenderMap, PeerState, ICEState } from '../type/index';
8
- import Client from './client';
9
- import Logger from '../tools/log/logger';
10
- import VideoAudioTrack from './track/videoAudioTrack';
11
- import ContentTrack from './track/contentTrack';
12
- /**
13
- * Peer模块,用于管理 P2S 连接和内部事件
8
+ * Peer模块,用于管理 P2P(媒体Server) 连接和内部事件
14
9
  */
15
10
  export default class Peer {
16
11
  private connectTimer;
@@ -18,10 +13,7 @@ export default class Peer {
18
13
  client: Client;
19
14
  peerConnection: RTCPeerConnection | null;
20
15
  logger: Logger;
21
- connectState: {
22
- peer: PeerState;
23
- ice: ICEState;
24
- };
16
+ connectState: XYConnectState;
25
17
  streamSenders: IStreamSender[];
26
18
  senderMap: ISenderMap;
27
19
  private senderTimer;
@@ -52,11 +44,9 @@ export default class Peer {
52
44
  /**
53
45
  * 向Client发送消息
54
46
  *
55
- * @private
56
47
  * @param { XYClientEventKey } type - 消息Key
57
48
  * @param { string } code - 状态码
58
- * @param { string } msg - 消息内容
59
- * @param { any } detail - 消息数据
49
+ * @param { unknown } detail - 补充消息内容
60
50
  */
61
51
  private sendEmmit;
62
52
  /**
@@ -81,20 +71,35 @@ export default class Peer {
81
71
  */
82
72
  private stopDetectTrackMsgTimer;
83
73
  /**
84
- * 监听peer连接状态,Timeout:40s
74
+ * 监听PeerConnection连接状态
75
+ */
76
+ private initDetectTimer;
77
+ /**
78
+ * 检测是否连接媒体服务器
79
+ */
80
+ private isConnectionMediaServer;
81
+ /**
82
+ * 成功连接媒体服务器后的处理逻辑
83
+ */
84
+ private handleConnectionMediaServer;
85
+ /**
86
+ * 超时检测连接状态
87
+ * 用于区分连接中、异常退会状态
88
+ *
89
+ * @param { boolean } disconnected - 是否是强制退会处理,设置为true代表强制退会
85
90
  */
86
- private initTimer;
91
+ private handleConnectionWarning;
87
92
  /**
88
93
  * 处理各种与媒体协商失败报错异常
89
- * 处理方式:上报结果并退会
94
+ * 处理方式:上报结果&退会或者提示
90
95
  *
91
96
  * @param { string } code - 错误码
97
+ * @param { boolean } disconnected - 是否强制退会,默认是false,代表不强制,设置为true会上报disconnected消息
98
+ * @param { unknown } detail - 可选,自定义消息详情数据
92
99
  */
93
100
  private handlePeerConnectError;
94
101
  /**
95
102
  * ice协商回调事件
96
- *
97
- * @private
98
103
  */
99
104
  private onHandleNegotiationNeeded;
100
105
  /**
@@ -150,7 +155,7 @@ export default class Peer {
150
155
  */
151
156
  setParameters(trackId: string, encodingParams: {
152
157
  bandwidth: number;
153
- frameRate?: number | undefined;
158
+ frameRate?: number;
154
159
  } | undefined, isIncreaseBase: boolean | undefined, stream: MediaStream | null): Promise<void>;
155
160
  /**
156
161
  * ICE Connection status change
@@ -0,0 +1,10 @@
1
+ import { PeerState, ICEState } from '../../type/index';
2
+
3
+ /**
4
+ * 接口表示Peer的连接状态,包括当前的Peer状态和ICE状态。
5
+ * 用于跟踪Peer连接和ICE协商过程的状态。
6
+ */
7
+ export interface XYConnectState {
8
+ peer: PeerState;
9
+ ice: ICEState;
10
+ }
@@ -1,11 +1,6 @@
1
- /**
2
- * WebRTC SDK AI Plugin Lib
3
- *
4
- * Created at : 2024-05-14 14:54:33
5
- * Last modified : 2024-05-14 15:21:59
6
- */
7
- import XYRTCClient from '../client';
8
1
  import { XYBaseModule } from '../../type/index';
2
+ import { default as XYRTCClient } from '../client';
3
+
9
4
  export declare class XYPlugin implements XYBaseModule {
10
5
  private logger;
11
6
  private plugin;
@@ -1,10 +1,5 @@
1
- /**
2
- * WebRTC SDK Quality Manager
3
- *
4
- * Created at : 2023-04-27 15:27:15
5
- * Last modified : 2024-04-23 19:03:09
6
- */
7
1
  import { IInternals, IWorkerVideoReceiver, IVideoReceiverMessage, IQualityConfig } from '../../type/index';
2
+
8
3
  declare class Quality {
9
4
  currentInternals: IInternals;
10
5
  nextInternals: IInternals;
@@ -6,8 +6,5 @@
6
6
  * Created at : 2023-04-24 14:16:27
7
7
  * Last modified : 2024-06-06 16:01:56
8
8
  */
9
- declare const _default: {
10
- new (scriptURL: string | URL, options?: WorkerOptions | undefined): Worker;
11
- prototype: Worker;
12
- } & (new () => Worker);
9
+ declare const _default: typeof Worker & (new () => Worker);
13
10
  export default _default;
@@ -1,5 +1,6 @@
1
- import Client from '../client';
2
1
  import { IConfInfo, IInternals, XYBaseModule } from '../../type/index';
2
+ import { default as Client } from '../client';
3
+
3
4
  declare class XYQualityReport implements XYBaseModule {
4
5
  private client;
5
6
  private reportDataTime;
@@ -1,12 +1,7 @@
1
- /**
2
- * XY WebRTC SDK Render Manager
3
- *
4
- * Created at : 2024-05-14 16:46:01
5
- * Last modified : 2024-07-09 19:38:25
6
- */
7
- import XYRTCClient from '../client';
8
- import VideoManager from './videoManager';
9
1
  import { IAudioRenders, XYVideoRendererMap, XYBaseModule } from '../../type/index';
2
+ import { default as VideoManager } from './videoManager';
3
+ import { default as XYRTCClient } from '../client';
4
+
10
5
  export declare class XYRender implements XYBaseModule {
11
6
  private client;
12
7
  private logger;
@@ -30,7 +25,7 @@ export declare class XYRender implements XYBaseModule {
30
25
  * @param { string } layoutId - 参会者Layout Id
31
26
  * @param { string } wrapEleId - 包裹video组件的容器ID字段
32
27
  */
33
- setSlaveVideoRenderer(layoutId: string, wrapEleId: string): import("../../type/index").IReturnResult;
28
+ setSlaveVideoRenderer(layoutId: string, wrapEleId: string): import('../../type/index').IReturnResult;
34
29
  /**
35
30
  * videoManagers 移除key对应的元素
36
31
  *
@@ -1,10 +1,5 @@
1
- /**
2
- * XYRender Lib Type Defined
3
- *
4
- * Created at : 2024-06-04 11:51:02
5
- * Last modified : 2024-06-04 16:00:23
6
- */
7
- import VideoManager from '../render/videoManager';
1
+ import { default as VideoManager } from './videoManager';
2
+
8
3
  export type XYVideoRendererMap = Map<string, VideoManager>;
9
4
  export type IAudioRenders = {
10
5
  [key: string]: {
@@ -1,11 +1,6 @@
1
- /**
2
- * XYLink WebRTC Video Manager Lib
3
- *
4
- * Created at : 2020-12-18 16:54:15
5
- * Last modified : 2024-06-05 18:14:48
6
- */
7
- import Logger from '../../tools/log/logger';
8
1
  import { IRotationInfoTotalItem, XYVideoState, XYLayoutState, ILayout, XYLayoutStateResult } from '../../type/index';
2
+ import { default as Logger } from '../../tools/log/logger';
3
+
9
4
  declare class VideoManager {
10
5
  private logger;
11
6
  private key;
@@ -1,13 +1,6 @@
1
- /**
2
- * 全量Roster
3
- *
4
- * @summary bulk roster
5
- *
6
- * Created at : 2024-05-23 10:49:45
7
- * Last modified : 2024-06-05 11:15:01
8
- */
9
- import Client from '../client';
10
1
  import { IBulkRoster, IRoster, XYBaseModule } from '../../type/index';
2
+ import { default as Client } from '../client';
3
+
11
4
  declare class RosterManager implements XYBaseModule {
12
5
  private client;
13
6
  private logger;
@@ -15,6 +8,13 @@ declare class RosterManager implements XYBaseModule {
15
8
  constructor(client: Client);
16
9
  getBulkRosterMap(): Map<string, IRoster>;
17
10
  destroy(): void;
11
+ /**
12
+ * 获取Roster数据
13
+ *
14
+ * @param { string } id - Roster Id
15
+ * @returns { IRoster | null } - Roster数据
16
+ */
17
+ getRosterById(id: string): IRoster | null;
18
18
  /**
19
19
  * 订阅Roster变更消息
20
20
  *
@@ -1,12 +1,22 @@
1
- import { XYServerInfo, XYServerUrlInfo } from './index.type';
2
- import Client from '../client';
1
+ import { ICodeList, IConfMgmtUrl } from '../../type/client';
2
+ import { default as Action } from '../../action/index';
3
+ import { default as Client } from '../client';
4
+ import { ClientServerConfig, ServerLinkData, XYServerInfo, XYServerUrlInfo } from './index.type';
5
+
3
6
  declare class ServerManager {
4
7
  private client;
5
8
  private logger;
6
9
  private action;
7
10
  private serverUrlInfo;
8
- private isInnerWss;
11
+ private innerWssServer;
12
+ private serverConfig;
13
+ private includeConfigNameList;
14
+ private errorcode;
15
+ private i18nCode;
9
16
  constructor(client: Client);
17
+ getErrorCode(): ICodeList;
18
+ getI18nCode(): ICodeList;
19
+ getServerConfig(): ClientServerConfig;
10
20
  /**
11
21
  * 获取服务器地址
12
22
  *
@@ -21,12 +31,38 @@ declare class ServerManager {
21
31
  * @returns { string } - 返回WebSocket地址
22
32
  */
23
33
  getWssUrl(): Promise<string>;
34
+ /**
35
+ * 设置国际化i8n列表
36
+ *
37
+ * @param { ICodeList } code - 国际化列表
38
+ */
39
+ setI18nCode(code: ICodeList): void;
40
+ /**
41
+ * 获取指定Key的国际化消息
42
+ *
43
+ * @param { string } key - 消息Key
44
+ * @returns { string } - 返回国际化消息
45
+ */
46
+ getI18nMessage(key: string): string;
47
+ /**
48
+ * 获取指定Key的错误消息
49
+ *
50
+ * @param { string } key - 消息Key
51
+ * @returns { string } - 返回错误码消息
52
+ */
53
+ getErrorCodeMessage(key: string): string;
54
+ /**
55
+ * 设置错误码列表
56
+ *
57
+ * @param { ICodeList } code - 错误码列表
58
+ */
59
+ setErrorCode(code: ICodeList): void;
24
60
  /**
25
61
  * 设置服务器地址
26
62
  *
27
63
  * @param { XYServerInfo } serverInfo - 服务器地址配置
28
64
  */
29
- setServerAddress(serverInfo: XYServerInfo): void;
65
+ setServerAddress(serverInfo: XYServerInfo): Promise<void>;
30
66
  /**
31
67
  * 内外网呼叫,通过此方法获取内网探测地址(信令网关地址)进行跨云呼叫会议,即内网用户呼叫内网服务,外网用户呼叫云服务;
32
68
  * 备注:混合云呼叫,rest服务都在外网,信令、媒体服务在内网
@@ -75,5 +111,38 @@ declare class ServerManager {
75
111
  * @returns { string } - 返回可用的内网WebRtcSigGW服务地址
76
112
  */
77
113
  private detectWorkingServer;
114
+ /**
115
+ * 确保服务器配置已加载
116
+ *
117
+ * @param {string} key - serverConfig的键值
118
+ */
119
+ verifyConfig(key: keyof ClientServerConfig): Promise<void>;
120
+ /**
121
+ * 获取错误码/i18n等json链接、会控地址、im地址
122
+ */
123
+ fetchAndSetConfig(): Promise<void>;
124
+ /**
125
+ * 获取会控相关地址/im地址
126
+ *
127
+ * @returns Promise<IConfMgmtUrl | null>
128
+ */
129
+ getConfMgmtUrl(): Promise<IConfMgmtUrl | null>;
130
+ /**
131
+ * 获取详细的会控地址
132
+ *
133
+ * @param { string } url server下发的会控地址
134
+ * @param { string } platform 平台
135
+ * @returns IConfMgmtUrl
136
+ */
137
+ private getMeetingControlUrl;
138
+ /**
139
+ * 获取链接内容
140
+ *
141
+ * @param { string } configName - 'errorcode' | 'i18n'
142
+ * @param { ServerLinkData } data - 数据
143
+ * @param { ServerLinkData } oldData - 历史数据
144
+ * @param { Action } action - Action实例
145
+ */
146
+ getCodeByJson(configName: string, data: ServerLinkData | string, oldData: ServerLinkData, action: Action): Promise<void>;
78
147
  }
79
148
  export default ServerManager;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * 服务器地址
3
+ * 格式:IP/域名 + 端口(可选),如: cloudapi.xylink.com
4
+ *
5
+ * @property { string } httpServer - 可选,WebRTC网关服务器地址
6
+ * @property { string } wssServer - 可选,WebRTC网关WebSocket服务器地址
7
+ * @property { string } logServer - 可选,日志服务器地址
8
+ */
9
+ export interface XYServerInfo {
10
+ httpServer?: string;
11
+ wssServer?: string;
12
+ logServer?: string;
13
+ }
14
+ /**
15
+ * 服务器地址, 包含协议
16
+ */
17
+ export interface XYServerUrlInfo {
18
+ httpServerUrl?: string;
19
+ wssServerUrl?: string;
20
+ logServerUrl?: string;
21
+ }
22
+ /**
23
+ * 服务相关地址
24
+ *
25
+ * @property { string } webServerUrl - 主服务地址
26
+ * @property { string } clientIm - IM 地址
27
+ * @property { string } errorcode - 错误码地址
28
+ * @property { string } i18n - 国际化地址
29
+ * @property { string } logServer - 日志服务地址
30
+ * @property { string } meetingControl - 会控地址
31
+ * @property { string } meetingControlMemebersUrl - 会控参会者地址
32
+ * @property { string } sidebarMeetingControlUrl - 会控侧边栏地址
33
+ */
34
+ export interface ClientServerConfig {
35
+ webServerUrl?: string;
36
+ clientIm?: string;
37
+ errorcode?: ServerLinkData;
38
+ i18n?: string;
39
+ logServer?: string;
40
+ meetingControl?: string;
41
+ meetingControlMemebersUrl?: string;
42
+ sidebarMeetingControlUrl?: string;
43
+ }
44
+ /**
45
+ * 链接内容
46
+ *
47
+ * @property { string } version - 版本
48
+ * @property { string } link - 链接地址
49
+ */
50
+ export interface ServerLinkData {
51
+ version: string;
52
+ link: string;
53
+ }
@@ -1,5 +1,6 @@
1
- import XYRTCClient from '../client';
2
1
  import { IMonitorReportMessage, XYBaseModule } from '../../type/index';
2
+ import { default as XYRTCClient } from '../client';
3
+
3
4
  export declare class XYSignal implements XYBaseModule {
4
5
  private client;
5
6
  private logger;
@@ -1,13 +1,8 @@
1
- /**
2
- * XY WebRTC SDK WebSocket Manager Lib
3
- *
4
- * Created at : 2024-05-15 14:51:40
5
- * Last modified : 2024-06-28 16:44:03
6
- */
7
- import XYRTCClient from '../client';
8
- import Socket from '../../tools/socket';
9
1
  import { XYBaseModule } from '../../type/index';
10
- export declare class XYSocketManager implements XYBaseModule {
2
+ import { Socket } from '../../tools/socket/socket';
3
+ import { default as XYRTCClient } from '../client';
4
+
5
+ export declare class XYClientSocket implements XYBaseModule {
11
6
  private client;
12
7
  private logger;
13
8
  private action;
@@ -63,9 +58,8 @@ export declare class XYSocketManager implements XYBaseModule {
63
58
  /**
64
59
  * 当websocket error,挂断会议
65
60
  *
66
- * @private
67
- * @param { string } errorCode 错误码
68
- * @param { TErrorReason } detail 详情
61
+ * @param { string } errorCode - 错误码
62
+ * @param { TErrorReason } detail - 详情
69
63
  */
70
64
  private disconnectInWssError;
71
65
  /**
@@ -1,16 +1,12 @@
1
- /**
2
- * XYLink WebRTC Stream Manager Lib
3
- *
4
- * @authors Luo-jinghui (luojinghui424@gmail.com)
5
- * @date 2019-10-27 23:12:45
6
- */
7
- import { IStreamChangeType, IGetMediaStreams, StreamKind, OperateType, IInitContentStream, DualStreamMsg, SnapshotParams, SnapshotResult, AnalyserConfig, XYBaseModule } from '../../type/index';
8
- import Peer from '../peer';
9
- import Logger from '../../tools/log/logger';
10
- import XYRTCClient from '../client';
11
- import VideoAudioTrack from '../track/videoAudioTrack';
12
- import ContentTrack from '../track/contentTrack';
13
- import AnalyserManager from '../../tools/analyserManager';
1
+ import { AnalyserManager } from '../../tools/analyser/manager';
2
+ import { default as ContentTrack } from '../track/contentTrack';
3
+ import { default as VideoAudioTrack } from '../track/videoAudioTrack';
4
+ import { default as XYRTCClient } from '../client';
5
+ import { default as Logger } from '../../tools/log/logger';
6
+ import { default as Peer } from '../peer/index';
7
+ import { SnapshotParams, SnapshotResult } from '../../tools/index';
8
+ import { IStreamChangeType, IGetMediaStreams, StreamKind, OperateType, IInitContentStream, DualStreamMsg, AnalyserConfig, XYBaseModule } from '../../type/index';
9
+
14
10
  export default class Stream implements XYBaseModule {
15
11
  logger: Logger;
16
12
  private clientInstance;
@@ -25,7 +21,7 @@ export default class Stream implements XYBaseModule {
25
21
  *
26
22
  * @returns { IStreamConfig[] } 本地预览流
27
23
  */
28
- getLocalStream(): import("../../type/index").IStreamConfig[] | undefined;
24
+ getLocalStream(): import('../../type/index').IStreamConfig[] | undefined;
29
25
  /**
30
26
  * Get client instance
31
27
  */
@@ -33,15 +29,15 @@ export default class Stream implements XYBaseModule {
33
29
  /**
34
30
  * Get device manager
35
31
  */
36
- getDeviceManager(): import("../device").default | undefined;
32
+ getDeviceManager(): import('../device').default | undefined;
37
33
  /**
38
34
  * Get layout manager
39
35
  */
40
- getLayoutManager(): import("../layout").default;
36
+ getLayoutManager(): import('../layout').default;
41
37
  /**
42
38
  * Get local roster
43
39
  */
44
- getSelfRoster(): import("../../type/index").IRoster;
40
+ getSelfRoster(): import('../../type/index').IRoster;
45
41
  /**
46
42
  * Get video and audio track
47
43
  */
@@ -59,14 +55,14 @@ export default class Stream implements XYBaseModule {
59
55
  *
60
56
  * @returns { IStreamConfig } - Audio stream config
61
57
  */
62
- getAudioStreamConfig(): import("../../type/index").IStreamConfig | undefined;
58
+ getAudioStreamConfig(): import('../../type/index').IStreamConfig | undefined;
63
59
  /**
64
60
  * 获取对应类型的StreamConfig
65
61
  *
66
62
  * @param { StreamKind } streamKind - stream类型
67
63
  * @returns { IStreamConfig } - 对应类型的StreamConfig
68
64
  */
69
- getNormalStreamConfig(streamKind: StreamKind): import("../../type/index").IStreamConfig | undefined;
65
+ getNormalStreamConfig(streamKind: StreamKind): import('../../type/index').IStreamConfig | undefined;
70
66
  /**
71
67
  * 销毁Stream模块
72
68
  */
@@ -110,7 +106,7 @@ export default class Stream implements XYBaseModule {
110
106
  * @param { OperateType } type - 操作类型
111
107
  * @returns
112
108
  */
113
- videoAudioProcess(type: OperateType): Promise<import("../../type/index").IReturnResult | undefined>;
109
+ videoAudioProcess(type: OperateType): Promise<import('../../type/index').IReturnResult | undefined>;
114
110
  /**
115
111
  * Close people track
116
112
  */
@@ -161,7 +157,7 @@ export default class Stream implements XYBaseModule {
161
157
  * @param { AnalyserConfig } config - Analyser分析器构造器配置
162
158
  * @return { AudioAnalyser | null } - 获取到的Stream
163
159
  */
164
- getAudioAnalyser(id?: string, config?: AnalyserConfig): import("../..").AudioAnalyser | null;
160
+ getAudioAnalyser(id?: string, config?: AnalyserConfig): import('../../tools/index').AudioAnalyser | null;
165
161
  /**
166
162
  * 销毁音频分析器,释放资源
167
163
  *
@@ -1,18 +1,10 @@
1
- /**
2
- * Track Base Lib
3
- *
4
- * @summary Track Base Lib
5
- * @author JingHui Luo <luojinghui424@gmail.com>
6
- *
7
- * Created at : 2023-11-20 20:10:04
8
- * Last modified : 2024-06-07 17:32:48
9
- */
10
- import Stream from '../stream';
11
- import Logger from '../../tools/log/logger';
1
+ import { XYEmitter } from '../../tools/emitter';
2
+ import { default as Peer } from '../peer/index';
12
3
  import { CaptureStatus, IEnableStreamConfig, IReturnResult, IStreamChangeType, IStreamConfig, StreamKind, XYDeviceEventKey, XYTrackEventKey } from '../../type/index';
13
- import Peer from '../peer';
14
- import Emitter from '../../tools/emitter';
15
- declare class BaseTrack extends Emitter<XYDeviceEventKey | XYTrackEventKey | string> {
4
+ import { default as Logger } from '../../tools/log/logger';
5
+ import { default as Stream } from '../stream';
6
+
7
+ declare class BaseTrack extends XYEmitter<XYDeviceEventKey | XYTrackEventKey | string> {
16
8
  streamInstance: Stream;
17
9
  logger: Logger;
18
10
  streams: IStreamConfig[];
@@ -1,16 +1,8 @@
1
- /**
2
- * Content Track Lib
3
- *
4
- * @summary Content track wrapper
5
- * @author JingHui Luo <luojinghui424@gmail.com>
6
- *
7
- * Created at : 2023-11-20 20:10:04
8
- * Last modified : 2024-06-07 17:37:34
9
- */
1
+ import { default as Peer } from '../peer/index';
2
+ import { default as BaseTrack } from './baseTrack';
3
+ import { default as Stream } from '../stream';
10
4
  import { ContentTrackConfig, IReturnResult, XYElectronSource, IStreamChangeType, ShareContentStatus, TrackLibType, XYContentTrackIF } from '../../type/index';
11
- import Stream from '../stream';
12
- import BaseTrack from './baseTrack';
13
- import Peer from '../peer';
5
+
14
6
  declare class ContentTrack extends BaseTrack implements XYContentTrackIF {
15
7
  private trackType;
16
8
  private baseTrackConfig;
@@ -0,0 +1,10 @@
1
+ import { default as BaseTrack } from './baseTrack';
2
+ import { default as Stream } from '../stream';
3
+ import { TrackLibType } from '../../type/index';
4
+
5
+ declare class CustomContentTrack extends BaseTrack {
6
+ private trackType;
7
+ constructor(streamInstance: Stream);
8
+ getTrackType(): TrackLibType;
9
+ }
10
+ export default CustomContentTrack;
@@ -0,0 +1,10 @@
1
+ import { default as BaseTrack } from './baseTrack';
2
+ import { default as Stream } from '../stream';
3
+ import { TrackLibType } from '../../type/index';
4
+
5
+ declare class CustomVideoAudioTrack extends BaseTrack {
6
+ private trackType;
7
+ constructor(streamInstance: Stream);
8
+ getTrackType(): TrackLibType;
9
+ }
10
+ export default CustomVideoAudioTrack;
@@ -2,7 +2,7 @@
2
2
  * Stream Constraints Helper Tools
3
3
  *
4
4
  * Created at : 2023-11-21 16:06:12
5
- * Last modified : 2024-04-23 11:30:15
5
+ * Last modified : 2024-08-16 17:46:28
6
6
  */
7
7
  export declare const ANALYSER_LOCAL_PREFIX = "LOCAL_PREFIX_";
8
8
  /**
@@ -29,6 +29,18 @@ export declare const mergeCompatibleConstraints: (baseConstraints?: any) => {
29
29
  video: any;
30
30
  audio: any;
31
31
  };
32
+ /**
33
+ * 异步延迟等待
34
+ *
35
+ * @param { number } num - 延迟时间,单位毫秒
36
+ */
37
+ export declare const sleepAsync: (num: number) => Promise<unknown>;
38
+ /**
39
+ * 同步延迟等待
40
+ *
41
+ * @param { number } msec - 延迟时间,单位毫秒
42
+ */
43
+ export declare const sleepSync: (msec: number) => Promise<void>;
32
44
  /**
33
45
  * 处理采集视频流错误码
34
46
  *
@@ -1,14 +1,6 @@
1
- /**
2
- * Video Audio Stream Capture
3
- *
4
- * @summary MediaStream Capture Lib
5
- * @author JingHui Luo <luojinghui424@gmail.com>
6
- *
7
- * Created at : 2023-12-19 10:34:14
8
- * Last modified : 2024-04-26 16:17:08
9
- */
1
+ import { default as VideoAudioTrack } from './videoAudioTrack';
10
2
  import { CaptureStatus, IEnableStreamConfig, IEnabledCapture, IStreamCurrent } from '../../type/index';
11
- import VideoAudioTrack from './videoAudioTrack';
3
+
12
4
  declare class videoAudioCapture {
13
5
  private enabledCapture;
14
6
  private track;