@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,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
|
-
*
|
|
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 {
|
|
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
|
-
* 监听
|
|
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
|
|
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
|
|
158
|
+
frameRate?: number;
|
|
154
159
|
} | undefined, isIncreaseBase: boolean | undefined, stream: MediaStream | null): Promise<void>;
|
|
155
160
|
/**
|
|
156
161
|
* ICE Connection status change
|
|
@@ -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,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(
|
|
28
|
+
setSlaveVideoRenderer(layoutId: string, wrapEleId: string): import('../../type/index').IReturnResult;
|
|
34
29
|
/**
|
|
35
30
|
* videoManagers 移除key对应的元素
|
|
36
31
|
*
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 {
|
|
2
|
-
import
|
|
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
|
|
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,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
|
-
|
|
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
|
-
* @
|
|
67
|
-
* @param {
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
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(
|
|
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(
|
|
32
|
+
getDeviceManager(): import('../device').default | undefined;
|
|
37
33
|
/**
|
|
38
34
|
* Get layout manager
|
|
39
35
|
*/
|
|
40
|
-
getLayoutManager(): import(
|
|
36
|
+
getLayoutManager(): import('../layout').default;
|
|
41
37
|
/**
|
|
42
38
|
* Get local roster
|
|
43
39
|
*/
|
|
44
|
-
getSelfRoster(): import(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
160
|
+
getAudioAnalyser(id?: string, config?: AnalyserConfig): import('../../tools/index').AudioAnalyser | null;
|
|
165
161
|
/**
|
|
166
162
|
* 销毁音频分析器,释放资源
|
|
167
163
|
*
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
|
14
|
-
import
|
|
15
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
@@ -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
|
-
|
|
3
|
+
|
|
12
4
|
declare class videoAudioCapture {
|
|
13
5
|
private enabledCapture;
|
|
14
6
|
private track;
|