@xylink/xy-rtc-sdk 4.0.1 → 4.0.2
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 +27 -112
- 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,17 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* Created at : 2023-11-20 20:10:04
|
|
8
|
-
* Last modified : 2024-06-07 17:30:52
|
|
9
|
-
*/
|
|
10
|
-
import { CaptureStatus, DEVICE_KIND, IFacingMode, IProcessTrack, IStreamChangeType, IStreamConfig, OperateType, StreamKind, SwitchDeviceConfig, TrackLibType, AnalyserNode, PeopleTrackConfig, IReturnResult, XYVideoAudioTrackIF } from '../../type/index';
|
|
11
|
-
import Stream from '../stream';
|
|
12
|
-
import BaseTrack from './baseTrack';
|
|
13
|
-
import Peer from '../peer';
|
|
14
|
-
import DeviceManager from '../device/index';
|
|
1
|
+
import { default as DeviceManager } from '../device/index';
|
|
2
|
+
import { default as Peer } from '../peer/index';
|
|
3
|
+
import { default as BaseTrack } from './baseTrack';
|
|
4
|
+
import { default as Stream } from '../stream';
|
|
5
|
+
import { CaptureStatus, DEVICE_KIND, FacingMode, IFacingMode, IProcessTrack, IStreamChangeType, IStreamConfig, OperateType, StreamKind, SwitchDeviceConfig, TrackLibType, AnalyserNode, PeopleTrackConfig, IReturnResult, XYVideoAudioTrackIF } from '../../type/index';
|
|
6
|
+
|
|
15
7
|
declare class VideoAudioTrack extends BaseTrack implements XYVideoAudioTrackIF {
|
|
16
8
|
deviceManager: DeviceManager;
|
|
17
9
|
private audioMediaStream;
|
|
@@ -29,6 +21,12 @@ declare class VideoAudioTrack extends BaseTrack implements XYVideoAudioTrackIF {
|
|
|
29
21
|
getLocalStream(): IStreamConfig[];
|
|
30
22
|
getTrackType(): TrackLibType;
|
|
31
23
|
getStreamInstance(): Stream;
|
|
24
|
+
/**
|
|
25
|
+
* 获取摄像头方向
|
|
26
|
+
*
|
|
27
|
+
* @returns { FacingMode } - 摄像头方向
|
|
28
|
+
*/
|
|
29
|
+
getFacingMode(): FacingMode;
|
|
32
30
|
/**
|
|
33
31
|
* Get device manager
|
|
34
32
|
*/
|
|
@@ -39,7 +37,7 @@ declare class VideoAudioTrack extends BaseTrack implements XYVideoAudioTrackIF {
|
|
|
39
37
|
* @returns { AnalyserNode } - 分析器实例
|
|
40
38
|
*/
|
|
41
39
|
getLocalAudioAnalyser(): AnalyserNode | null;
|
|
42
|
-
getEnableCapture(): import(
|
|
40
|
+
getEnableCapture(): import('../../type/index').IEnabledCapture;
|
|
43
41
|
/**
|
|
44
42
|
* 采集麦克风和摄像头流,支持分别采集
|
|
45
43
|
* 调用此方法后,SDK开始执行采集麦克风和摄像头流操作,采集完成后,即可推送到远端;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VOM带宽控制
|
|
3
|
-
*
|
|
4
|
-
* Created at : 2024-05-08 16:21:12
|
|
5
|
-
* Last modified : 2024-05-10 14:09:51
|
|
6
|
-
*/
|
|
7
|
-
import XYRTCClient from '../client';
|
|
8
1
|
import { IStreamChangeListType, IStreamChangeType } from '../../type/index';
|
|
2
|
+
import { default as XYRTCClient } from '../client';
|
|
3
|
+
|
|
9
4
|
export declare class VOM {
|
|
10
5
|
protected clientInstance: XYRTCClient;
|
|
11
6
|
private streamChange;
|
package/package.json
CHANGED
|
@@ -1,125 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylink/xy-rtc-sdk",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "XYLink RTC SDK(小鱼易连WebRTC SDK)",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"XYLink RTC SDK",
|
|
7
|
-
"XYLink WebRTC SDK",
|
|
8
|
-
"WebRTC SDK",
|
|
9
|
-
"RTC SDK"
|
|
10
|
-
],
|
|
11
|
-
"main": "lib/xyrtc.cjs.js",
|
|
12
|
-
"types": "lib/index.d.ts",
|
|
13
|
-
"scripts": {
|
|
14
|
-
"dev": "npm run start",
|
|
15
|
-
"start": "cross-env NODE_ENV=development webpack serve --config ./scripts/webpack.dev.js",
|
|
16
|
-
"build:demo": "cross-env NODE_ENV=production webpack --config ./scripts/webpack.common.js",
|
|
17
|
-
"build:lib": "cross-env NODE_ENV=production webpack --config ./scripts/webpack.sdk.js && tsc-alias -p tsconfig.lib.json",
|
|
18
|
-
"build:nodeLib": "node ./scripts/build_lib.js",
|
|
19
|
-
"test": "jest",
|
|
20
|
-
"xytools": "xytools",
|
|
21
|
-
"version:beta": "npm version prerelease --preid=beta",
|
|
22
|
-
"publish:beta": "npm publish --tag beta --access public"
|
|
23
|
-
},
|
|
3
|
+
"version": "4.0.2",
|
|
24
4
|
"author": "jinghui-Luo",
|
|
25
5
|
"email": "luojinghui424@gmail.com",
|
|
26
6
|
"bugs": {
|
|
27
7
|
"url": "https://github.com/xylink-com/xylink-rtc-demo/issues",
|
|
28
8
|
"email": "luojinghui424@gmail.com"
|
|
29
9
|
},
|
|
10
|
+
"main": "./xyrtc.js",
|
|
11
|
+
"module": "./xyrtc.js",
|
|
12
|
+
"typings": "./index.d.ts",
|
|
13
|
+
"private": false,
|
|
14
|
+
"keywords": [
|
|
15
|
+
"XYLink RTC SDK",
|
|
16
|
+
"XYLink WebRTC SDK",
|
|
17
|
+
"WebRTC SDK",
|
|
18
|
+
"RTC SDK"
|
|
19
|
+
],
|
|
30
20
|
"devDependencies": {
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"
|
|
36
|
-
"@babel/preset-typescript": "^7.7.4",
|
|
37
|
-
"@svgr/webpack": "^6.3.1",
|
|
38
|
-
"@types/clone-deep": "^4.0.1",
|
|
39
|
-
"@types/crypto-js": "^4.0.1",
|
|
40
|
-
"@types/downloadjs": "^1.4.2",
|
|
41
|
-
"@types/react": "^17.0.3",
|
|
42
|
-
"@types/react-dom": "^17.0.6",
|
|
43
|
-
"@types/uuid": "^8.3.0",
|
|
44
|
-
"@xylink/xy-virtual-background-plugin": "0.0.4",
|
|
45
|
-
"@xylink/xy_api_gateway": "0.4.9-lite.3",
|
|
46
|
-
"antd": "4.15.5",
|
|
47
|
-
"axios": "^0.19.1",
|
|
48
|
-
"babel-loader": "^8.2.5",
|
|
49
|
-
"babel-plugin-import": "^1.13.5",
|
|
21
|
+
"@types/clone-deep": "^4.0.4",
|
|
22
|
+
"@types/downloadjs": "^1.4.6",
|
|
23
|
+
"@types/uuid": "^10.0.0",
|
|
24
|
+
"@xylink/xy_api_gateway": "0.4.9-lite.6",
|
|
25
|
+
"axios": "^1.7.2",
|
|
50
26
|
"clone-deep": "^4.0.1",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"cross-env": "^7.0.3",
|
|
54
|
-
"crypto-browserify": "^3.12.0",
|
|
55
|
-
"css-loader": "^6.7.1",
|
|
56
|
-
"dexie": "^3.2.3",
|
|
57
|
-
"dexie-export-import": "^4.0.7",
|
|
27
|
+
"dexie": "^4.0.8",
|
|
28
|
+
"dexie-export-import": "^4.1.2",
|
|
58
29
|
"downloadjs": "^1.4.7",
|
|
59
30
|
"encryptlong": "^3.1.4",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"js-sha512": "^0.8.0",
|
|
68
|
-
"jszip": "^3.5.0",
|
|
69
|
-
"less": "^4.1.3",
|
|
70
|
-
"less-loader": "^11.0.0",
|
|
71
|
-
"lint-staged": "^10.5.4",
|
|
72
|
-
"mini-css-extract-plugin": "^2.6.1",
|
|
73
|
-
"portfinder": "^1.0.32",
|
|
74
|
-
"postcss-loader": "^7.0.1",
|
|
75
|
-
"prettier": "^2.8.8",
|
|
76
|
-
"react": "^16.10.2",
|
|
77
|
-
"react-dom": "^16.10.2",
|
|
78
|
-
"sass": "^1.54.3",
|
|
79
|
-
"sass-loader": "^13.0.2",
|
|
80
|
-
"style-loader": "^3.3.1",
|
|
81
|
-
"terser-webpack-plugin": "^5.3.3",
|
|
82
|
-
"ts-loader": "^9.3.1",
|
|
83
|
-
"tsc-alias": "^1.8.8",
|
|
84
|
-
"typescript": "^4.3.2",
|
|
85
|
-
"uuid": "^7.0.2",
|
|
86
|
-
"validate-commit-msg": "^2.14.0",
|
|
87
|
-
"vconsole": "^3.3.4",
|
|
88
|
-
"webpack": "^5.74.0",
|
|
89
|
-
"webpack-cli": "^4.10.0",
|
|
90
|
-
"webpack-dev-server": "^4.9.3",
|
|
91
|
-
"worker-loader": "^3.0.8",
|
|
92
|
-
"xytools": "^1.5.7",
|
|
93
|
-
"zustand": "^4.5.1"
|
|
94
|
-
},
|
|
95
|
-
"dependencies": {},
|
|
96
|
-
"husky": {
|
|
97
|
-
"hooks": {
|
|
98
|
-
"pre-commit": "lint-staged",
|
|
99
|
-
"commit-msg": "validate-commit-msg"
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"config": {
|
|
103
|
-
"validate-commit-msg": {
|
|
104
|
-
"types": [
|
|
105
|
-
"feat",
|
|
106
|
-
"fix",
|
|
107
|
-
"docs",
|
|
108
|
-
"style",
|
|
109
|
-
"refactor",
|
|
110
|
-
"perf",
|
|
111
|
-
"test",
|
|
112
|
-
"build",
|
|
113
|
-
"ci",
|
|
114
|
-
"chore",
|
|
115
|
-
"revert",
|
|
116
|
-
"merge"
|
|
117
|
-
]
|
|
118
|
-
}
|
|
31
|
+
"js-base64": "^3.7.7",
|
|
32
|
+
"js-sha512": "^0.9.0",
|
|
33
|
+
"jszip": "^3.10.1",
|
|
34
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
35
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
36
|
+
"terser": "^5.37.0",
|
|
37
|
+
"uuid": "^10.0.0"
|
|
119
38
|
},
|
|
120
|
-
"
|
|
121
|
-
|
|
122
|
-
"prettier --write"
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
}
|
|
39
|
+
"scripts": {}
|
|
40
|
+
}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* get audio level
|
|
5
|
-
*
|
|
6
|
-
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
7
|
-
* @date 2019-11-08 16:03:15
|
|
8
|
-
*/
|
|
9
|
-
import { AnalyserConfig } from '../type/index';
|
|
1
|
+
import { AnalyserConfig } from '../../type/index';
|
|
2
|
+
|
|
10
3
|
export declare class AudioAnalyser {
|
|
11
4
|
level: number;
|
|
12
5
|
private audioContext;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* @author JingHui Luo <luojinghui424@gmail.com>
|
|
6
|
-
*
|
|
7
|
-
* Created at : 2023-12-08 15:06:23
|
|
8
|
-
* Last modified : 2024-04-15 17:47:46
|
|
9
|
-
*/
|
|
10
|
-
import { AnalyserConfig, AnalyserNode } from '../type/index';
|
|
11
|
-
import Client from '../main/client';
|
|
12
|
-
declare class AnalyserManager {
|
|
1
|
+
import { default as Client } from '../../main/client';
|
|
2
|
+
import { AnalyserConfig, AnalyserNode } from '../../type/index';
|
|
3
|
+
|
|
4
|
+
export declare class AnalyserManager {
|
|
13
5
|
private analyserMap;
|
|
14
6
|
private logger;
|
|
15
7
|
constructor(client: Client);
|
|
@@ -52,4 +44,3 @@ declare class AnalyserManager {
|
|
|
52
44
|
*/
|
|
53
45
|
private getEndedAnalyser;
|
|
54
46
|
}
|
|
55
|
-
export default AnalyserManager;
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
|
-
* @date 2019-10-24 14:06:05
|
|
6
|
-
*/
|
|
7
|
-
export declare const SDKVersion: {
|
|
8
|
-
version: any;
|
|
9
|
-
createTime: any;
|
|
10
|
-
};
|
|
1
|
+
import { XYVersion } from '../type/base';
|
|
2
|
+
|
|
3
|
+
export declare const SDKVersion: XYVersion;
|
|
11
4
|
export declare const version: string;
|
|
12
5
|
export declare const serverProtocolMap: Record<string, string>;
|
|
13
6
|
export declare const proxy: {
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 数据队列
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2024-09-10 19:39:31
|
|
5
|
+
* Last modified : 2024-09-11 11:36:43
|
|
6
|
+
*/
|
|
7
|
+
export declare class XYList<T> {
|
|
8
|
+
private items;
|
|
9
|
+
/**
|
|
10
|
+
* 入队
|
|
11
|
+
* @param { T } data - 入队数据
|
|
12
|
+
*/
|
|
13
|
+
enqueue(data: T): void;
|
|
14
|
+
/**
|
|
15
|
+
* 出队
|
|
16
|
+
*/
|
|
17
|
+
dequeue(): T | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* 指定位置之后,全部出队
|
|
20
|
+
*/
|
|
21
|
+
dequeueAllByIndex(index: number): T[];
|
|
22
|
+
/**
|
|
23
|
+
* 出栈
|
|
24
|
+
*/
|
|
25
|
+
pop(): T | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* 队首
|
|
28
|
+
* @returns { T } - 队首数据
|
|
29
|
+
*/
|
|
30
|
+
front(): T;
|
|
31
|
+
/**
|
|
32
|
+
* 队未
|
|
33
|
+
* @returns { T } - 队未数据
|
|
34
|
+
*/
|
|
35
|
+
last(): T;
|
|
36
|
+
/**
|
|
37
|
+
* 获取指定索引数据
|
|
38
|
+
*
|
|
39
|
+
* @param { number } index - 索引位
|
|
40
|
+
* @returns { T } - 索引数据
|
|
41
|
+
*/
|
|
42
|
+
get(index: number): T;
|
|
43
|
+
/**
|
|
44
|
+
* 获取所有数据
|
|
45
|
+
*/
|
|
46
|
+
getAll(): T[];
|
|
47
|
+
/**
|
|
48
|
+
* 是否为空
|
|
49
|
+
*
|
|
50
|
+
* @returns { boolean } - 是否为空
|
|
51
|
+
*/
|
|
52
|
+
isEmpty(): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* 获取队列长度
|
|
55
|
+
*
|
|
56
|
+
* @returns { number } - 长度
|
|
57
|
+
*/
|
|
58
|
+
size(): number;
|
|
59
|
+
/**
|
|
60
|
+
* 清空队列
|
|
61
|
+
*/
|
|
62
|
+
clear(): void;
|
|
63
|
+
/**
|
|
64
|
+
* 枚举遍历
|
|
65
|
+
*
|
|
66
|
+
* @param { function } fun - 枚举函数
|
|
67
|
+
*/
|
|
68
|
+
map(fun: (data: T) => T): this;
|
|
69
|
+
/**
|
|
70
|
+
* 遍历
|
|
71
|
+
*
|
|
72
|
+
* @param { function } fun - 遍历函数
|
|
73
|
+
*/
|
|
74
|
+
each(fun: (data: T) => void): this;
|
|
75
|
+
/**
|
|
76
|
+
* 更新指定值
|
|
77
|
+
*
|
|
78
|
+
* @param { function } fun - 更新函数
|
|
79
|
+
*/
|
|
80
|
+
updateOne(fun: (data: T) => [boolean, T] | [boolean]): this;
|
|
81
|
+
/**
|
|
82
|
+
* 寻找一个值
|
|
83
|
+
*
|
|
84
|
+
* @param { function } fun - 更新函数
|
|
85
|
+
*/
|
|
86
|
+
find(fun: (data: T) => boolean): T | null;
|
|
87
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 数据Map结构
|
|
3
|
+
*
|
|
4
|
+
* TODO:待开发
|
|
5
|
+
*
|
|
6
|
+
* Created at : 2024-09-10 19:39:31
|
|
7
|
+
* Last modified : 2024-09-11 11:36:43
|
|
8
|
+
*/
|
|
9
|
+
export declare class XYMap<T, U> {
|
|
10
|
+
private map;
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* 转Json方法
|
|
14
|
+
* TODO:待开发
|
|
15
|
+
*/
|
|
16
|
+
toJson(): string;
|
|
17
|
+
}
|
|
@@ -43,13 +43,13 @@ export declare class XYBrowserDetector {
|
|
|
43
43
|
*
|
|
44
44
|
* @return { string } - 操作系统名称
|
|
45
45
|
*/
|
|
46
|
-
static getOperationSystem(): "
|
|
46
|
+
static getOperationSystem(): "Windows WXWechat" | "Windows Wechat" | "Windows" | "iOS" | "Android" | "iPad" | "Mac" | "Linux" | "MiniProgram" | "Harmony" | "";
|
|
47
47
|
/**
|
|
48
48
|
* 获取浏览器名称
|
|
49
49
|
*
|
|
50
50
|
* @returns { string } - 浏览器名称
|
|
51
51
|
*/
|
|
52
|
-
static getBrowserName: () => "Firefox" | "Chrome" | "Safari" | "Edge" | "Opera" | "Internet Explorer" | "WindowsWechat" | "WindowsWxWechat" | "Weixin" | "WXWeixin" | "Tencent" | "Huawei" | "Other" | "
|
|
52
|
+
static getBrowserName: () => "Harmony" | "Firefox" | "Chrome" | "Safari" | "Edge" | "Opera" | "Internet Explorer" | "WindowsWechat" | "WindowsWxWechat" | "Weixin" | "WXWeixin" | "Tencent" | "Huawei" | "Other" | "Unknown";
|
|
53
53
|
/**
|
|
54
54
|
* 获取Chrome浏览器版本
|
|
55
55
|
*/
|
|
@@ -110,5 +110,5 @@ export declare class XYBrowserDetector {
|
|
|
110
110
|
* @param { string } v2 - 版本2
|
|
111
111
|
* @returns { -1 | 0 | 1} 1: 版本1大于版本2
|
|
112
112
|
*/
|
|
113
|
-
static compareVersion(v1: string, v2: string): 1 |
|
|
113
|
+
static compareVersion(v1: string, v2: string): 1 | 0 | -1;
|
|
114
114
|
}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Detect 检测浏览器支持情况
|
|
3
|
-
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
4
|
-
* @date 2019-10-22 11:11:55
|
|
5
|
-
*/
|
|
6
|
-
import { XYBrowserDetector } from '../detectBrowser/index';
|
|
7
|
-
import { XYStreamDetector } from '../detectStream/index';
|
|
8
1
|
import { ICheckSystemRequirements, DetectSupportFeature, DetectSupportTest, DetectDeviceCodecList } from './index.type';
|
|
2
|
+
import { XYStreamDetector } from './stream';
|
|
3
|
+
import { XYBrowserDetector } from './browser';
|
|
4
|
+
|
|
9
5
|
export declare class XYDetector {
|
|
10
6
|
/**
|
|
11
7
|
* Canvas元素ID
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* @author JingHui Luo <luojinghui424@gmail.com>
|
|
5
|
-
*
|
|
6
|
-
* Created at : 2024-04-23 18:20:29
|
|
7
|
-
* Last modified : 2024-04-30 15:17:32
|
|
8
|
-
*/
|
|
9
|
-
import { DetectDeviceList, DetectMaxRes, DetectStreamType } from './index.type';
|
|
1
|
+
import { DetectDeviceList, DetectMaxRes, DetectStreamType } from './stream.type';
|
|
2
|
+
|
|
10
3
|
export declare class XYStreamDetector {
|
|
11
4
|
private deviceList;
|
|
12
5
|
private maxResolutionMap;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Event Emitter
|
|
2
|
+
* XYLink Event Emitter
|
|
3
3
|
*
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-10-17 19:14:39
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export declare class XYEmitter<T> {
|
|
8
8
|
private eventMap;
|
|
9
|
-
constructor();
|
|
10
9
|
/**
|
|
11
10
|
* 监听事件
|
|
12
11
|
*
|
|
@@ -22,6 +21,13 @@ export default class Emitter<T> {
|
|
|
22
21
|
* @param { string } key - 事件Key
|
|
23
22
|
*/
|
|
24
23
|
removeListener(key: T): void;
|
|
24
|
+
/**
|
|
25
|
+
* 移除指定事件和监听器
|
|
26
|
+
*
|
|
27
|
+
* @param { string } key - 事件Key
|
|
28
|
+
* @param { Function } event - 事件回调函数
|
|
29
|
+
*/
|
|
30
|
+
removeEventListener(key: T, event: any): void;
|
|
25
31
|
/**
|
|
26
32
|
* 移除所有监听器
|
|
27
33
|
*/
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MessageCallback } from './index.type';
|
|
2
|
+
|
|
3
|
+
export declare class XYFrameBridge {
|
|
4
|
+
/**
|
|
5
|
+
* 主窗口向iframe发送消息
|
|
6
|
+
*
|
|
7
|
+
* @param { HTMLIFrameElement } iframe - iframe
|
|
8
|
+
* @param { string | Object } message - 消息内容
|
|
9
|
+
*/
|
|
10
|
+
static sendToChild(iframe: HTMLIFrameElement, message: string | Object): void;
|
|
11
|
+
/**
|
|
12
|
+
* 主窗口监听iframe发送的消息
|
|
13
|
+
*
|
|
14
|
+
* @param { HTMLIFrameElement } iframe - iframe
|
|
15
|
+
* @param { MessageCallback } callback - 回调函数
|
|
16
|
+
*/
|
|
17
|
+
static receiveFromChild(iframe: HTMLIFrameElement, callback: MessageCallback): (event: MessageEvent) => void;
|
|
18
|
+
/**
|
|
19
|
+
* 移除主窗口监听iframe发送的消息
|
|
20
|
+
*
|
|
21
|
+
* @param { MessageCallback } handler - 回调函数
|
|
22
|
+
*/
|
|
23
|
+
static removeFromChild(handler: MessageCallback): void;
|
|
24
|
+
/**
|
|
25
|
+
* 子窗口向父窗口发送消息
|
|
26
|
+
*
|
|
27
|
+
* @param { string } message - 消息内容
|
|
28
|
+
*/
|
|
29
|
+
static sendToParent(message: string | Object): void;
|
|
30
|
+
/**
|
|
31
|
+
* 监听来自父窗口的消息
|
|
32
|
+
*
|
|
33
|
+
* @param { MessageCallback } callback - 回调函数
|
|
34
|
+
*/
|
|
35
|
+
static receiveFromParent(callback: MessageCallback): void;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type MessageCallback = (event: MessageEvent) => void;
|
package/tools/index.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { default as Logger } from './log/logger';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 音频分析相关模块
|
|
5
|
+
*/
|
|
6
|
+
export { AudioAnalyser } from './analyser';
|
|
7
|
+
export { AnalyserManager } from './analyser/manager';
|
|
8
|
+
/**
|
|
9
|
+
* 数据结构
|
|
10
|
+
*/
|
|
11
|
+
export { XYList } from './data/list';
|
|
12
|
+
export { XYMap } from './data/map';
|
|
13
|
+
/**
|
|
14
|
+
* 设备和采集能力检测相关模块
|
|
15
|
+
*/
|
|
16
|
+
export { XYBrowserDetector } from './detector/browser';
|
|
17
|
+
export { XYStreamDetector } from './detector/stream';
|
|
18
|
+
export { XYDetector } from './detector/index';
|
|
19
|
+
export * from './detector/index.type';
|
|
20
|
+
export * from './detector/stream.type';
|
|
21
|
+
/**
|
|
22
|
+
* 日志模块
|
|
23
|
+
*/
|
|
24
|
+
export { DBManager } from './log/db';
|
|
25
|
+
export { Logger };
|
|
26
|
+
export { LogManager, logManager } from './log/loggerManager';
|
|
27
|
+
/**
|
|
28
|
+
* 设备压力
|
|
29
|
+
*/
|
|
30
|
+
export { XYDevicePressure } from './pressure';
|
|
31
|
+
export * from './pressure/index.type';
|
|
32
|
+
/**
|
|
33
|
+
* 任务队列(同步/异步)
|
|
34
|
+
*/
|
|
35
|
+
export { XYAsyncQueue } from './queue/async';
|
|
36
|
+
export { XYSyncQueue } from './queue/sync';
|
|
37
|
+
export * from './queue/queue.type';
|
|
38
|
+
/**
|
|
39
|
+
* 截图模块
|
|
40
|
+
*/
|
|
41
|
+
export { XYSnapshot } from './snapshot';
|
|
42
|
+
export * from './snapshot/index.type';
|
|
43
|
+
/**
|
|
44
|
+
* WebSocket管理模块
|
|
45
|
+
*/
|
|
46
|
+
export { Socket } from './socket/socket';
|
|
47
|
+
export { SocketManager } from './socket/socketManager';
|
|
48
|
+
/**
|
|
49
|
+
* 事件订阅/发布
|
|
50
|
+
*/
|
|
51
|
+
export { XYEmitter } from './emitter';
|
|
52
|
+
/**
|
|
53
|
+
* IFrame交互库
|
|
54
|
+
*/
|
|
55
|
+
export { XYFrameBridge } from './frame/index';
|
|
56
|
+
export * from './frame/index.type';
|
|
57
|
+
/**
|
|
58
|
+
* 屏幕大小变化监听
|
|
59
|
+
*/
|
|
60
|
+
export { XYResize, resize } from './resize';
|
|
61
|
+
/**
|
|
62
|
+
* 缓存存储管理
|
|
63
|
+
*/
|
|
64
|
+
export { XYStore } from './store';
|
|
65
|
+
/**
|
|
66
|
+
* 工具函数
|
|
67
|
+
*/
|
|
68
|
+
export { XYDebounce, XYThrottle, XYCurrentTime, TYPEOF } from './utils';
|
|
69
|
+
/**
|
|
70
|
+
* 系统基础信息
|
|
71
|
+
*/
|
|
72
|
+
export { XYWindow } from './window';
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
|
-
* @date 2020-02-27 18:17:49
|
|
6
|
-
*/
|
|
7
|
-
import { IDBManagerConfig } from '../type/index';
|
|
8
|
-
declare class DBManager {
|
|
1
|
+
import { ILoggerConfig } from '../../type/index';
|
|
2
|
+
|
|
3
|
+
export declare class DBManager {
|
|
9
4
|
dbInstance: any;
|
|
10
|
-
config:
|
|
5
|
+
config: ILoggerConfig;
|
|
11
6
|
private tableCountTimer;
|
|
12
7
|
private tableInstance;
|
|
13
|
-
constructor(config:
|
|
8
|
+
constructor(config: ILoggerConfig);
|
|
14
9
|
/**
|
|
15
10
|
* 更新配置
|
|
16
11
|
*
|
|
17
|
-
* @param {
|
|
12
|
+
* @param { ILoggerConfig } config - 配置
|
|
18
13
|
*/
|
|
19
|
-
setConfig(config:
|
|
14
|
+
setConfig(config: ILoggerConfig): void;
|
|
20
15
|
/**
|
|
21
16
|
* 初始化数据库
|
|
22
17
|
*/
|
|
@@ -64,7 +59,7 @@ declare class DBManager {
|
|
|
64
59
|
/**
|
|
65
60
|
* 导出blob文件进度回调
|
|
66
61
|
*/
|
|
67
|
-
progressCallback(
|
|
62
|
+
progressCallback(): boolean;
|
|
68
63
|
/**
|
|
69
64
|
* 超过设置最大的表数量后,定时清理表
|
|
70
65
|
*/
|
|
@@ -114,4 +109,3 @@ declare class DBManager {
|
|
|
114
109
|
*/
|
|
115
110
|
isOpen(): any;
|
|
116
111
|
}
|
|
117
|
-
export default DBManager;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Logger日志库-v2
|
|
3
|
-
* 使用WebWorker作为输出和日志控制
|
|
4
|
-
*
|
|
5
|
-
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
6
|
-
* @date 2019-10-22 20:08:33
|
|
7
|
-
*/
|
|
8
1
|
import { LogLevel, ILoggerConfig, TLogLevel, UploadLogParams } from '../../type/index';
|
|
2
|
+
|
|
9
3
|
declare class Logger {
|
|
10
4
|
private action;
|
|
11
5
|
private worker;
|
|
@@ -18,6 +12,7 @@ declare class Logger {
|
|
|
18
12
|
taskPromiseMap: {
|
|
19
13
|
[key: string]: any;
|
|
20
14
|
};
|
|
15
|
+
private isMainThread;
|
|
21
16
|
constructor(config: ILoggerConfig);
|
|
22
17
|
/**
|
|
23
18
|
* 获取日志模块配置
|
|
@@ -81,8 +76,10 @@ declare class Logger {
|
|
|
81
76
|
* 调试模式下,控制台输出日志的等级
|
|
82
77
|
*
|
|
83
78
|
* @param { LogLevel } level 日志等级
|
|
79
|
+
* @param { boolean } mainThread 是否在主线程console日志,默认false, 在worker中console
|
|
80
|
+
*
|
|
84
81
|
*/
|
|
85
|
-
setLogLevel: (level: TLogLevel) => void;
|
|
82
|
+
setLogLevel: (level: TLogLevel, mainThread?: boolean) => void;
|
|
86
83
|
/**
|
|
87
84
|
* 设置日志服务器地址
|
|
88
85
|
*
|
|
@@ -147,7 +144,7 @@ declare class Logger {
|
|
|
147
144
|
/**
|
|
148
145
|
* 下载日志数据到本地,可在浏览器控制台中调用
|
|
149
146
|
*/
|
|
150
|
-
downloadLog: (fileName?: string |
|
|
147
|
+
downloadLog: (fileName?: string | "") => Promise<unknown>;
|
|
151
148
|
/**
|
|
152
149
|
* 上传会议日志到小鱼服务器
|
|
153
150
|
*
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XYLink WebRTC SDK Logger Webworker
|
|
3
|
+
*
|
|
4
|
+
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
|
+
*
|
|
6
|
+
* Created at : 2023-04-24 14:16:27
|
|
7
|
+
* Last modified : 2024-11-12 18:30:35
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: typeof Worker & (new () => Worker);
|
|
10
|
+
export default _default;
|