@xylink/xy-rtc-sdk 3.9.11-private.6 → 4.0.0
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 +36 -13
- package/lib/action/index.d.ts +106 -36
- package/lib/enum/analyser.d.ts +7 -0
- package/lib/enum/client.d.ts +8 -2
- package/lib/enum/constraints.d.ts +51 -0
- package/lib/enum/device.d.ts +28 -0
- package/lib/enum/errorCode.d.ts +8 -2
- package/lib/enum/i18n.d.ts +6 -0
- package/lib/enum/index.d.ts +90 -7
- package/lib/enum/meeting.d.ts +4 -0
- package/lib/enum/polling.d.ts +2 -11
- package/lib/feature/customMessage/index.d.ts +29 -0
- package/lib/feature/edu/index.d.ts +34 -0
- package/lib/feature/edu/index.type.d.ts +29 -0
- package/lib/feature/index.d.ts +3 -0
- package/lib/feature/speaker/index.d.ts +81 -0
- package/lib/feature/speaker/index.type.d.ts +17 -0
- package/lib/index.d.ts +84 -31
- package/lib/interface/baseModule.type.d.ts +9 -0
- package/lib/interface/clientInterface.type.d.ts +128 -0
- package/lib/interface/contentTrackInterface.type.d.ts +15 -0
- package/lib/interface/event.type.d.ts +444 -0
- package/lib/interface/videoAudioTrackInterface.type.d.ts +17 -0
- package/lib/main/ability/const.d.ts +5 -0
- package/lib/main/ability/index.d.ts +37 -0
- package/lib/main/{iauth.d.ts → auth/index.d.ts} +34 -26
- package/lib/main/client.d.ts +643 -637
- package/lib/main/clientBase.d.ts +40 -0
- package/lib/main/clientState.d.ts +56 -0
- package/lib/main/device/index.d.ts +272 -0
- package/lib/main/device/index.type.d.ts +204 -0
- package/lib/main/helper/index.d.ts +118 -0
- package/lib/main/helper/index.type.d.ts +12 -0
- package/lib/main/layout/index.d.ts +74 -108
- package/lib/main/layout/index.type.d.ts +282 -0
- package/lib/main/layout/polling.d.ts +17 -13
- package/lib/main/layout/state.d.ts +163 -0
- package/lib/main/layout/template.d.ts +3 -3
- package/lib/main/media/index.d.ts +177 -0
- package/lib/main/media/index.type.d.ts +29 -0
- package/lib/main/meeting/control.d.ts +107 -0
- package/lib/main/meeting/control.type.d.ts +24 -0
- package/lib/main/{meeting.d.ts → meeting/index.d.ts} +58 -28
- package/lib/main/meeting/verify.d.ts +70 -0
- package/lib/main/meeting/verify.type.d.ts +12 -0
- package/lib/main/peer.d.ts +67 -19
- package/lib/main/plugin/index.d.ts +28 -0
- package/lib/{tools/quality.d.ts → main/quality/index.d.ts} +2 -2
- package/lib/{tools → main/quality}/quality.worker.d.ts +1 -1
- package/lib/main/{qualityManager.d.ts → quality/report.d.ts} +11 -5
- package/lib/main/render/index.d.ts +116 -0
- package/lib/main/render/index.type.d.ts +36 -0
- package/lib/main/render/videoManager.d.ts +190 -0
- package/lib/main/render/videoManager.type.d.ts +66 -0
- package/lib/main/roster/index.d.ts +39 -0
- package/lib/main/server/index.d.ts +79 -0
- package/lib/main/server/index.type.d.ts +21 -0
- package/lib/main/signal/index.d.ts +15 -0
- package/lib/main/socket/index.d.ts +95 -0
- package/lib/main/stream/index.d.ts +182 -0
- package/lib/main/track/baseTrack.d.ts +178 -0
- package/lib/main/track/contentTrack.d.ts +168 -0
- package/lib/main/track/customContentTrack.d.ts +18 -0
- package/lib/main/track/customVideoAudioTrack.d.ts +18 -0
- package/lib/main/track/helper.d.ts +53 -0
- package/lib/main/track/videoAudioCapture.d.ts +90 -0
- package/lib/main/track/videoAudioTrack.d.ts +273 -0
- package/lib/main/vom/index.d.ts +44 -0
- package/lib/main/vom/index.type.d.ts +1 -0
- package/lib/tools/analyser.d.ts +53 -0
- package/lib/tools/analyserManager.d.ts +55 -0
- package/lib/tools/dbManager.d.ts +12 -1
- package/lib/tools/{browser.d.ts → detectBrowser/index.d.ts} +53 -5
- package/lib/tools/detectStream/index.d.ts +84 -0
- package/lib/tools/detectStream/index.type.d.ts +56 -0
- package/lib/tools/detectTool/index.d.ts +191 -0
- package/lib/tools/detectTool/index.type.d.ts +51 -0
- package/lib/tools/emitter.d.ts +27 -6
- package/lib/tools/enum.d.ts +1 -1
- package/lib/tools/httpClient.d.ts +23 -6
- package/lib/tools/i18n.d.ts +1 -1
- package/lib/tools/index.d.ts +5 -5
- package/lib/tools/{logger.d.ts → log/logger.d.ts} +59 -29
- package/lib/tools/{logger.worker.d.ts → log/logger.worker.d.ts} +1 -1
- package/lib/tools/log/loggerManager.d.ts +70 -0
- package/lib/tools/pressure/index.d.ts +33 -0
- package/lib/tools/pressure/index.type.d.ts +22 -0
- package/lib/tools/promiseQueue.d.ts +51 -0
- package/lib/tools/queue.d.ts +12 -15
- package/lib/tools/resize.d.ts +65 -0
- package/lib/tools/snapshot.d.ts +31 -0
- package/lib/tools/socket.d.ts +109 -32
- package/lib/tools/template/index.d.ts +3 -3
- package/lib/tools/template/mobile.d.ts +1 -1
- package/lib/tools/template/polling.d.ts +1 -1
- package/lib/tools/utils.d.ts +22 -19
- package/lib/tools/verify.d.ts +7 -0
- package/lib/type/ability.d.ts +25 -0
- package/lib/type/analyser.d.ts +43 -0
- package/lib/type/{iauth.d.ts → auth.d.ts} +22 -29
- package/lib/type/base.d.ts +41 -33
- package/lib/type/capture.d.ts +9 -0
- package/lib/type/client.d.ts +404 -498
- package/lib/type/index.d.ts +26 -2
- package/lib/type/layout.d.ts +25 -49
- package/lib/type/logger.d.ts +37 -12
- package/lib/type/meeting.d.ts +266 -27
- package/lib/type/peer.d.ts +24 -1
- package/lib/type/polling.d.ts +1 -49
- package/lib/type/quality.d.ts +16 -6
- package/lib/type/socket.d.ts +42 -0
- package/lib/type/stream.d.ts +154 -116
- package/lib/type/track.d.ts +139 -0
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +11 -3
- package/lib/enum/contraints.d.ts +0 -50
- package/lib/main/deviceManager.d.ts +0 -185
- package/lib/main/helper.d.ts +0 -79
- package/lib/main/stream.d.ts +0 -396
- package/lib/main/videoManager.d.ts +0 -57
- package/lib/tools/audioLevel.d.ts +0 -23
- package/lib/tools/detect.d.ts +0 -43
- package/lib/type/device.d.ts +0 -83
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylink/xy-rtc-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "XYLink RTC SDK(小鱼易连WebRTC SDK)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"XYLink RTC SDK",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dev": "npm run start",
|
|
15
15
|
"start": "cross-env NODE_ENV=development webpack serve --config ./scripts/webpack.dev.js",
|
|
16
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",
|
|
17
|
+
"build:lib": "cross-env NODE_ENV=production webpack --config ./scripts/webpack.sdk.js && tsc-alias -p tsconfig.lib.json",
|
|
18
18
|
"build:nodeLib": "node ./scripts/build_lib.js",
|
|
19
19
|
"test": "jest",
|
|
20
20
|
"xytools": "xytools",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/core": "^7.18.10",
|
|
32
|
+
"@babel/plugin-proposal-decorators": "^7.24.1",
|
|
32
33
|
"@babel/plugin-transform-runtime": "^7.18.10",
|
|
33
34
|
"@babel/preset-env": "^7.18.10",
|
|
34
35
|
"@babel/preset-react": "^7.18.6",
|
|
@@ -40,8 +41,9 @@
|
|
|
40
41
|
"@types/react": "^17.0.3",
|
|
41
42
|
"@types/react-dom": "^17.0.6",
|
|
42
43
|
"@types/uuid": "^8.3.0",
|
|
44
|
+
"@xylink/xy-virtual-background-plugin": "0.0.4",
|
|
43
45
|
"@xylink/xy_api_gateway": "0.4.9-lite.3",
|
|
44
|
-
"antd": "4.
|
|
46
|
+
"antd": "4.15.5",
|
|
45
47
|
"axios": "^0.19.1",
|
|
46
48
|
"babel-loader": "^8.2.5",
|
|
47
49
|
"babel-plugin-import": "^1.13.5",
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
"copy-webpack-plugin": "^11.0.0",
|
|
50
52
|
"core-js": "^3.24.1",
|
|
51
53
|
"cross-env": "^7.0.3",
|
|
54
|
+
"crypto-browserify": "^3.12.0",
|
|
52
55
|
"css-loader": "^6.7.1",
|
|
53
56
|
"dexie": "^3.2.3",
|
|
54
57
|
"dexie-export-import": "^4.0.7",
|
|
@@ -56,6 +59,7 @@
|
|
|
56
59
|
"encryptlong": "^3.1.4",
|
|
57
60
|
"eslint": "^6.7.1",
|
|
58
61
|
"eslint-config-alloy": "^3.4.0",
|
|
62
|
+
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
59
63
|
"html-webpack-plugin": "^5.5.0",
|
|
60
64
|
"husky": "^4.3.8",
|
|
61
65
|
"jest": "^25.1.0",
|
|
@@ -66,6 +70,7 @@
|
|
|
66
70
|
"less-loader": "^11.0.0",
|
|
67
71
|
"lint-staged": "^10.5.4",
|
|
68
72
|
"mini-css-extract-plugin": "^2.6.1",
|
|
73
|
+
"portfinder": "^1.0.32",
|
|
69
74
|
"postcss-loader": "^7.0.1",
|
|
70
75
|
"prettier": "^2.8.8",
|
|
71
76
|
"react": "^16.10.2",
|
|
@@ -75,7 +80,9 @@
|
|
|
75
80
|
"style-loader": "^3.3.1",
|
|
76
81
|
"terser-webpack-plugin": "^5.3.3",
|
|
77
82
|
"ts-loader": "^9.3.1",
|
|
83
|
+
"tsc-alias": "^1.8.8",
|
|
78
84
|
"typescript": "^4.3.2",
|
|
85
|
+
"uuid": "^7.0.2",
|
|
79
86
|
"validate-commit-msg": "^2.14.0",
|
|
80
87
|
"vconsole": "^3.3.4",
|
|
81
88
|
"webpack": "^5.74.0",
|
|
@@ -85,6 +92,7 @@
|
|
|
85
92
|
"xytools": "^1.5.7",
|
|
86
93
|
"zustand": "^4.5.1"
|
|
87
94
|
},
|
|
95
|
+
"dependencies": {},
|
|
88
96
|
"husky": {
|
|
89
97
|
"hooks": {
|
|
90
98
|
"pre-commit": "lint-staged",
|
package/lib/enum/contraints.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { I_CONTENT_CONSTRAINTS, I_PEOPLE_CONSTRAINTS, IConstraintsConfigMap, IStreamConfig } from '../type';
|
|
2
|
-
/**
|
|
3
|
-
* people特殊约束配置
|
|
4
|
-
*
|
|
5
|
-
* @param { IStreamConfig } streamConfig - 自定义流数据
|
|
6
|
-
* @param { boolean } streamConfig.enableAspectRatio - 采集时是否支持设置视频流的宽高比, 默认支持
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
|
-
export declare const SPECIAL_PEOPLE_CONSTRAINTS: (streamConfig: IStreamConfig) => I_PEOPLE_CONSTRAINTS;
|
|
10
|
-
/**
|
|
11
|
-
* people基础约束配置
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
export declare const BASE_PEOPLE_CONSTRAINTS: I_PEOPLE_CONSTRAINTS;
|
|
16
|
-
/**
|
|
17
|
-
* content采集基础约束配置
|
|
18
|
-
*/
|
|
19
|
-
export declare const BASE_CONTENT_CONSTRAINTS: I_CONTENT_CONSTRAINTS;
|
|
20
|
-
/**
|
|
21
|
-
* people采集音频基础约束配置
|
|
22
|
-
*/
|
|
23
|
-
export declare const BASE_PEOPLE_AUDIO_CONSTRAINTS: {
|
|
24
|
-
channelCount: number;
|
|
25
|
-
autoGainControl: boolean;
|
|
26
|
-
noiseSuppression: boolean;
|
|
27
|
-
echoCancellation: boolean;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* content 720P 1080P 采集配置信息
|
|
31
|
-
*
|
|
32
|
-
* COMMON: 普通模式
|
|
33
|
-
* ADVANCED: 高级模式, 帧率、宽、高 可进行最大、最小、期望设置
|
|
34
|
-
*/
|
|
35
|
-
export declare const CONTENT_CONSTRAINTS: IConstraintsConfigMap;
|
|
36
|
-
/**
|
|
37
|
-
* people 180P 360P 720P 采集配置信息
|
|
38
|
-
*
|
|
39
|
-
* common: 普通模式
|
|
40
|
-
* advanced: 高级模式, 帧率、宽、高 可进行最大、最小、期望设置
|
|
41
|
-
*/
|
|
42
|
-
export declare const PEOPLE_CONSTRAINTS: IConstraintsConfigMap;
|
|
43
|
-
/**
|
|
44
|
-
* 分辨率枚举,将分辨率转换为0-6的索引值
|
|
45
|
-
*/
|
|
46
|
-
export declare const RESOLUTION_MAP: Record<string, number>;
|
|
47
|
-
/**
|
|
48
|
-
* 枚举分辨率对应的最小带宽值
|
|
49
|
-
*/
|
|
50
|
-
export declare const MIN_BANDWIDTH_MAP: Record<string, number>;
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* XYLink WebRTC Device & Permission Manager Lib
|
|
3
|
-
*
|
|
4
|
-
* @summary device and permission manager
|
|
5
|
-
* @author jinghui-luo、chengfei
|
|
6
|
-
*
|
|
7
|
-
* Created at : 2020-11-26 14:41:51
|
|
8
|
-
* Last modified : 2023-11-16 09:39:11
|
|
9
|
-
*/
|
|
10
|
-
import Logger from '../tools/logger';
|
|
11
|
-
import Emitter from '../tools/emitter';
|
|
12
|
-
import { IDeviceInfo, IDeviceList, ISelectedDevice, ICurrentPermission, PermissionType, DeviceKind, FacingMode } from '../type';
|
|
13
|
-
/**
|
|
14
|
-
* DeviceManager模块,用于管理枚举设备列表、监听设备变动、处理设备权限等功能
|
|
15
|
-
*
|
|
16
|
-
* @class DeviceManager
|
|
17
|
-
* @extends Emitter 事件发送器
|
|
18
|
-
*/
|
|
19
|
-
declare class DeviceManager extends Emitter {
|
|
20
|
-
private navigator;
|
|
21
|
-
private currentDeviceList;
|
|
22
|
-
private nextDeviceList;
|
|
23
|
-
private currentUsedDevice;
|
|
24
|
-
private currentPermission;
|
|
25
|
-
private permissionCameraStatus;
|
|
26
|
-
private permissionPhoneStatus;
|
|
27
|
-
logger: Logger;
|
|
28
|
-
isNewLogger: boolean;
|
|
29
|
-
constructor(logger?: Logger);
|
|
30
|
-
/**
|
|
31
|
-
* 获取设备权限数据
|
|
32
|
-
*/
|
|
33
|
-
getDevicePermission(): ICurrentPermission;
|
|
34
|
-
/**
|
|
35
|
-
* 获取当前设备列表
|
|
36
|
-
* @returns
|
|
37
|
-
*/
|
|
38
|
-
getNextDeviceList(): IDeviceList;
|
|
39
|
-
/**
|
|
40
|
-
* 设置当前正在使用的设备信息
|
|
41
|
-
* 1. 此信息可能从stream中获取
|
|
42
|
-
*
|
|
43
|
-
* @param devices 设备数据
|
|
44
|
-
*/
|
|
45
|
-
setCurrentUsedDevice(currentDevice: ISelectedDevice): Promise<void>;
|
|
46
|
-
checkDeviceIsExist(devices: IDeviceList, currentDevice: ISelectedDevice): ISelectedDevice;
|
|
47
|
-
checkDeviceIsExistByKind(devices: IDeviceInfo[], device: IDeviceInfo | undefined): IDeviceInfo | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* 设置当前正在使用的设备信息
|
|
50
|
-
* 切换设备时,需重新设置此值,为下次diffDevice 使用
|
|
51
|
-
* @param type
|
|
52
|
-
* @param deviceId
|
|
53
|
-
*/
|
|
54
|
-
setCurrentUsedDeviceByType(type: DeviceKind, deviceId: string): void;
|
|
55
|
-
/**
|
|
56
|
-
* 设置输出设备
|
|
57
|
-
*
|
|
58
|
-
* @param element video元素节点
|
|
59
|
-
* @param outputDeviceId 设备id
|
|
60
|
-
*/
|
|
61
|
-
setAudioOutputDevice(element: any, outputDeviceId: string): void;
|
|
62
|
-
/**
|
|
63
|
-
* 向外提供权限信息
|
|
64
|
-
*/
|
|
65
|
-
emmitDevices(): Promise<void>;
|
|
66
|
-
/**
|
|
67
|
-
* 初始化构造器函数
|
|
68
|
-
*/
|
|
69
|
-
init(): Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* 销毁设备管理器实例
|
|
72
|
-
*/
|
|
73
|
-
destroy(): void;
|
|
74
|
-
/**
|
|
75
|
-
* 获取设备列表
|
|
76
|
-
*
|
|
77
|
-
* @private
|
|
78
|
-
* @returns { IDeviceList } list
|
|
79
|
-
*/
|
|
80
|
-
private getPrivateDevices;
|
|
81
|
-
/**
|
|
82
|
-
* 获取设备列表数据
|
|
83
|
-
*/
|
|
84
|
-
getDevices(): Promise<IDeviceList>;
|
|
85
|
-
/**
|
|
86
|
-
* 设置当前麦克风/摄像头权限
|
|
87
|
-
*
|
|
88
|
-
* @param { ICurrentPermission } permission - 新的权限状态
|
|
89
|
-
*/
|
|
90
|
-
setPermission(permission: ICurrentPermission): void;
|
|
91
|
-
/**
|
|
92
|
-
* 通过采集能力更新设备权限
|
|
93
|
-
*
|
|
94
|
-
* @param { PermissionType } video - 摄像头权限
|
|
95
|
-
* @param { PermissionType } audio - 麦克风权限
|
|
96
|
-
*/
|
|
97
|
-
updateDevicePermission(video: PermissionType, audio: PermissionType): void;
|
|
98
|
-
/**
|
|
99
|
-
* 【私有方法】
|
|
100
|
-
* 向外提供权限信息
|
|
101
|
-
*/
|
|
102
|
-
private emmitPermission;
|
|
103
|
-
/**
|
|
104
|
-
* 【私有方法】
|
|
105
|
-
* 查询权限接口
|
|
106
|
-
*
|
|
107
|
-
* @param type 需要检测的设备类型 'microphone' | 'camera'
|
|
108
|
-
*/
|
|
109
|
-
private query;
|
|
110
|
-
/**
|
|
111
|
-
* 【私有方法】
|
|
112
|
-
* 监听权限变更
|
|
113
|
-
*
|
|
114
|
-
* @param e 回调权限数据
|
|
115
|
-
*/
|
|
116
|
-
private handlePermissionCameraStateChanged;
|
|
117
|
-
/**
|
|
118
|
-
* 【私有方法】
|
|
119
|
-
* 监听权限变更
|
|
120
|
-
*
|
|
121
|
-
* @param e 回调权限数据
|
|
122
|
-
*/
|
|
123
|
-
private handlePermissionPhoneStateChanged;
|
|
124
|
-
/**
|
|
125
|
-
* 获取摄像头和麦克风权限方法,初始化时直接调用
|
|
126
|
-
*
|
|
127
|
-
* TODO:兼容方式通过获取devices设备去检测是否授予了权限
|
|
128
|
-
* TODO:可以通过looping的形式检测,后续在处理
|
|
129
|
-
*/
|
|
130
|
-
getPermission(): Promise<ICurrentPermission>;
|
|
131
|
-
/**
|
|
132
|
-
* 获取手机前置/后置摄像头
|
|
133
|
-
*
|
|
134
|
-
* @param { FacingMode } type
|
|
135
|
-
* @returns { IDeviceInfo } 摄像头信息
|
|
136
|
-
*/
|
|
137
|
-
getCameraDeviceByMode(type: FacingMode): Promise<IDeviceInfo>;
|
|
138
|
-
/**
|
|
139
|
-
* 【私有方法】
|
|
140
|
-
* 如果有音频设备插入,则选取最新设备
|
|
141
|
-
* 如果有音频设备拔出,则选默认设备
|
|
142
|
-
* 如果有音频设备进行切换,则以切换为主
|
|
143
|
-
*
|
|
144
|
-
* @param preList
|
|
145
|
-
* @param nextList
|
|
146
|
-
*/
|
|
147
|
-
private diffAudioDevice;
|
|
148
|
-
/**
|
|
149
|
-
* 【私有方法】
|
|
150
|
-
* 获取最新的摄像头设备数据
|
|
151
|
-
* 1. 默认采用新加入的摄像头设备
|
|
152
|
-
* 2. 如果当前使用的设备被拔出,采用第0个设备数据
|
|
153
|
-
*
|
|
154
|
-
* @param preVideoInList 上一次的摄像头列表数据
|
|
155
|
-
* @param nextVideoInList 设备变化后的摄像头列表数据
|
|
156
|
-
*/
|
|
157
|
-
private diffVideoDevice;
|
|
158
|
-
/**
|
|
159
|
-
* 【私有方法】
|
|
160
|
-
* 通过和最新的设备数据对比,得到设备差异
|
|
161
|
-
* 用于切换到最新的设备
|
|
162
|
-
*
|
|
163
|
-
* @param currentDevices 当前设备列表
|
|
164
|
-
* @param nextDevices 设备变化后的列表
|
|
165
|
-
*/
|
|
166
|
-
private diffDevices;
|
|
167
|
-
/**
|
|
168
|
-
* 【私有方法】
|
|
169
|
-
* 设备变化监听函数
|
|
170
|
-
* 1. detail: 最新的设备列表数据
|
|
171
|
-
* 2. nextDevice: 需要切换的设备数据
|
|
172
|
-
*/
|
|
173
|
-
private mediaDevicesChange;
|
|
174
|
-
/**
|
|
175
|
-
* 【私有方法】
|
|
176
|
-
* 初始化设备监听函数
|
|
177
|
-
*/
|
|
178
|
-
private initDeviceEvent;
|
|
179
|
-
/**
|
|
180
|
-
* 【私有方法】
|
|
181
|
-
* 移除设备监听函数
|
|
182
|
-
*/
|
|
183
|
-
private removeDeviceEvent;
|
|
184
|
-
}
|
|
185
|
-
export default DeviceManager;
|
package/lib/main/helper.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Common Helper Function Lib
|
|
3
|
-
*
|
|
4
|
-
* @author jinghui-Luo
|
|
5
|
-
* @email luojinghui424@gmail.com
|
|
6
|
-
*
|
|
7
|
-
* Created at : 2021-01-09 14:45:46
|
|
8
|
-
* Last modified : 2024-04-19 14:13:30
|
|
9
|
-
*/
|
|
10
|
-
import { ILayout, IVideoManagerState, IRotationInfoTotalItem } from '../type';
|
|
11
|
-
export declare const getLayoutItemState: (item: ILayout | ILayout, stream: MediaStream | null, vmState: IVideoManagerState) => "REQUEST" | "NORMAL" | "MUTE" | "AUDIO_TEL" | "AUDIO_ONLY" | "AUDIO_CONTENT";
|
|
12
|
-
/**
|
|
13
|
-
* Get video real display size and rotate of transform infos
|
|
14
|
-
* @param width video real width of resolution
|
|
15
|
-
* @param height video real height of resolution
|
|
16
|
-
* @param containerHeight display video container size
|
|
17
|
-
* @param containerWidth display video container size
|
|
18
|
-
* @param rotate video real ratio
|
|
19
|
-
*/
|
|
20
|
-
export declare const getVideoInfoByRotation: (width: number, height: number, containerHeight: number, containerWidth: number, rotate: number) => {
|
|
21
|
-
realWidth: number;
|
|
22
|
-
realHeight: number;
|
|
23
|
-
realRotate: number;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* 通过旋转信息配合画面容器计算应该旋转的角度和宽高
|
|
27
|
-
*
|
|
28
|
-
* @param item rotateInfo 设备旋转item,通过rotate-info接口回调获取
|
|
29
|
-
* @param containerWidth 当前参会者画面容器的宽度
|
|
30
|
-
* @param containerHeight 当前参会者画面容器的高度
|
|
31
|
-
*/
|
|
32
|
-
export declare const getLayoutRotateInfo: (item: IRotationInfoTotalItem, containerWidth: number, containerHeight: number) => {};
|
|
33
|
-
/**
|
|
34
|
-
* 获取可支持的编解码
|
|
35
|
-
*
|
|
36
|
-
* @public
|
|
37
|
-
* @returns { Promise<Object> }
|
|
38
|
-
*/
|
|
39
|
-
export declare const getSendSupportedCodec: () => Object;
|
|
40
|
-
/**
|
|
41
|
-
* WebRTC 内外网探测
|
|
42
|
-
*
|
|
43
|
-
* @public
|
|
44
|
-
* @returns { Promise<Object> }
|
|
45
|
-
*/
|
|
46
|
-
export declare const detectLocator: ({ extId, clientId, clientSecret, httpServer }: {
|
|
47
|
-
extId: string;
|
|
48
|
-
clientId: string;
|
|
49
|
-
clientSecret: string;
|
|
50
|
-
httpServer?: string | undefined;
|
|
51
|
-
}) => Promise<string>;
|
|
52
|
-
/**
|
|
53
|
-
* 生成用户唯一Layout ID值
|
|
54
|
-
*
|
|
55
|
-
* @param { string } callUri - callUri或者endpointId值
|
|
56
|
-
* @param { number | string } mediagroupid - 多分组通道ID,常见:0代表people,1代表content,会控喊话有>10值
|
|
57
|
-
* @param { string } customId - 自定义ID,默认是""
|
|
58
|
-
* @return { string } 唯一ID
|
|
59
|
-
*/
|
|
60
|
-
export declare const getLayoutId: (callUri?: string, mediagroupid?: number | string, customId?: string) => string;
|
|
61
|
-
/**
|
|
62
|
-
* 生成用户Roster ID值
|
|
63
|
-
*
|
|
64
|
-
* @param { string } callUri - callUri或者endpointId值
|
|
65
|
-
* @param { number | string } mediagroupid - 多分组通道ID,常见:0代表people,1代表content,会控喊话有>10值
|
|
66
|
-
* @return { string } Roster ID
|
|
67
|
-
*/
|
|
68
|
-
export declare const getRosterId: (callUri?: string, mediagroupid?: number | string) => string;
|
|
69
|
-
/**
|
|
70
|
-
* 获取Layout ID或Roster Id组合信息,依次是:endpointId、mediagroupId、customId、roster key信息
|
|
71
|
-
*
|
|
72
|
-
* @param { string } id - Layout ID/Roster ID
|
|
73
|
-
*/
|
|
74
|
-
export declare const getLayoutIdInfo: (id: string) => {
|
|
75
|
-
endpointId: string;
|
|
76
|
-
mediagroupId: string | number;
|
|
77
|
-
customId: string;
|
|
78
|
-
rosterId: string;
|
|
79
|
-
};
|