@xylink/xy-rtc-sdk 2.1.2 → 3.8.0-beta.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 +37 -37
- package/lib/{src/action → action}/index.d.ts +254 -236
- package/lib/{src/enum → enum}/contraints.d.ts +121 -116
- package/lib/{src/enum → enum}/errorCode.d.ts +880 -880
- package/lib/{src/enum → enum}/index.d.ts +137 -133
- package/lib/{src/index.d.ts → index.d.ts} +34 -34
- package/lib/{src/main → main}/client.d.ts +953 -808
- package/lib/{src/main → main}/deviceManager.d.ts +164 -164
- package/lib/{src/main → main}/helper.d.ts +51 -51
- package/lib/{src/main → main}/iauth.d.ts +33 -33
- package/lib/{src/main → main}/layoutManager.d.ts +214 -214
- package/lib/main/meeting.d.ts +80 -0
- package/lib/{src/main → main}/peer.d.ts +311 -311
- package/lib/{src/main → main}/qualityManager.d.ts +39 -39
- package/lib/{src/main → main}/stream.d.ts +263 -243
- package/lib/{src/main → main}/videoManager.d.ts +65 -65
- package/lib/{src/tools → tools}/audioLevel.d.ts +23 -23
- package/lib/{src/tools → tools}/browser.d.ts +55 -55
- package/lib/{src/tools → tools}/config.d.ts +14 -12
- package/lib/{src/tools → tools}/db.d.ts +85 -85
- package/lib/{src/tools → tools}/detect.d.ts +44 -45
- package/lib/{src/tools → tools}/emmitter.d.ts +15 -15
- package/lib/{src/tools → tools}/enum.d.ts +6 -6
- package/lib/{src/tools → tools}/httpClient.d.ts +64 -64
- package/lib/{src/tools → tools}/i18n.d.ts +8 -8
- package/lib/{src/tools → tools}/index.d.ts +8 -8
- package/lib/{src/tools → tools}/logger.d.ts +151 -151
- package/lib/{src/tools → tools}/socket.d.ts +53 -53
- package/lib/{src/tools → tools}/store.d.ts +15 -15
- package/lib/{src/tools → tools}/template.d.ts +14 -14
- package/lib/{src/tools → tools}/utils.d.ts +74 -67
- package/lib/{src/tools → tools}/verify.d.ts +7 -7
- package/lib/type/action.d.ts +6 -0
- package/lib/{src/type → type}/base.d.ts +71 -71
- package/lib/{src/type → type}/client.d.ts +1174 -1106
- package/lib/{src/type → type}/device.d.ts +77 -77
- package/lib/{src/type → type}/index.d.ts +13 -11
- package/lib/type/meeting.d.ts +41 -0
- package/lib/{src/type → type}/quality.d.ts +77 -77
- package/lib/{src/type → type}/stream.d.ts +426 -426
- package/lib/xyrtc.cjs.js +1 -0
- package/lib/xyrtc.umd.js +1 -0
- package/package.json +119 -130
- package/scripts/build_lib.js +16 -0
- package/scripts/utils.js +27 -0
- package/scripts/webpack.common.js +139 -0
- package/scripts/webpack.dev.js +27 -0
- package/scripts/webpack.sdk.js +68 -0
- package/tsconfig.lib.json +37 -0
- package/lib/index.es.js +0 -3
- package/lib/index.js +0 -3
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WebRTC权限状态
|
|
3
|
-
*
|
|
4
|
-
* @value granted 已授权
|
|
5
|
-
* @value denied 已拒绝
|
|
6
|
-
* @value prompt 询问中
|
|
7
|
-
* @value unknown 未知
|
|
8
|
-
* @value '' 默认
|
|
9
|
-
*/
|
|
10
|
-
export declare type TPermissionType = 'granted' | 'denied' | 'prompt' | 'unknown' | 'failed' | '';
|
|
11
|
-
/**
|
|
12
|
-
* 获取设备信息
|
|
13
|
-
*
|
|
14
|
-
* @property { string } deviceId 设备id
|
|
15
|
-
* @property { string } label 设备名称
|
|
16
|
-
* @property { string } groupId 设备分组
|
|
17
|
-
* @property { 'output' | 'input' } direction 设备方向
|
|
18
|
-
* @value output 输出设备
|
|
19
|
-
* @value input 输入设备
|
|
20
|
-
* @property { 'audioinput' | 'audiooutput' | 'videoinput' } kind 设备种类
|
|
21
|
-
* @value audioinput 音频输入
|
|
22
|
-
* @value audiooutput 音频输出
|
|
23
|
-
* @value videoinput 摄像头输入
|
|
24
|
-
* @property { string } type 设备采集流类型:video/audio
|
|
25
|
-
*/
|
|
26
|
-
export declare type IDeviceInfo = {
|
|
27
|
-
deviceId: string;
|
|
28
|
-
label: string;
|
|
29
|
-
groupId?: string;
|
|
30
|
-
direction?: 'output' | 'input';
|
|
31
|
-
kind?: 'audioinput' | 'audiooutput' | 'videoinput';
|
|
32
|
-
type?: 'video' | 'audio';
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* 设备列表:麦克风、扬声器、摄像头
|
|
36
|
-
*
|
|
37
|
-
* @property { IDeviceInfo[] } audioInputList 麦克风列表
|
|
38
|
-
* @property { IDeviceInfo[] } audioOutputList 扬声器列表
|
|
39
|
-
* @property { IDeviceInfo[] } videoInList 摄像头列表
|
|
40
|
-
*/
|
|
41
|
-
export declare type IDeviceList = {
|
|
42
|
-
audioInputList: IDeviceInfo[];
|
|
43
|
-
audioOutputList: IDeviceInfo[];
|
|
44
|
-
videoInList: IDeviceInfo[];
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* 当前已选择设备信息
|
|
48
|
-
*
|
|
49
|
-
* @property { IDeviceInfo | undefined } audioInput 麦克风设备
|
|
50
|
-
* @property { IDeviceInfo | undefined } audioOutput 扬声器设备
|
|
51
|
-
* @property { IDeviceInfo | undefined } videoInput 摄像头设备
|
|
52
|
-
*/
|
|
53
|
-
export declare type ISelectedDevice = {
|
|
54
|
-
audioInput: IDeviceInfo | undefined;
|
|
55
|
-
videoInput: IDeviceInfo | undefined;
|
|
56
|
-
audioOutput: IDeviceInfo | undefined;
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* 设备变化事件
|
|
60
|
-
*
|
|
61
|
-
* @property { ISelectedDevice } nextDevice 最新的设备
|
|
62
|
-
* @property { IDeviceList } detail 最新设备详细信息
|
|
63
|
-
*/
|
|
64
|
-
export declare type IDeviceManagerChangeValue = {
|
|
65
|
-
nextDevice: ISelectedDevice;
|
|
66
|
-
detail: IDeviceList;
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* 当前麦克风/摄像头权限
|
|
70
|
-
*
|
|
71
|
-
* @property { TPermissionType } microphone 麦克风权限
|
|
72
|
-
* @property { TPermissionType } camera 摄像头权限
|
|
73
|
-
*/
|
|
74
|
-
export interface ICurrentPermission {
|
|
75
|
-
microphone: TPermissionType;
|
|
76
|
-
camera: TPermissionType;
|
|
77
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* WebRTC权限状态
|
|
3
|
+
*
|
|
4
|
+
* @value granted 已授权
|
|
5
|
+
* @value denied 已拒绝
|
|
6
|
+
* @value prompt 询问中
|
|
7
|
+
* @value unknown 未知
|
|
8
|
+
* @value '' 默认
|
|
9
|
+
*/
|
|
10
|
+
export declare type TPermissionType = 'granted' | 'denied' | 'prompt' | 'unknown' | 'failed' | '';
|
|
11
|
+
/**
|
|
12
|
+
* 获取设备信息
|
|
13
|
+
*
|
|
14
|
+
* @property { string } deviceId 设备id
|
|
15
|
+
* @property { string } label 设备名称
|
|
16
|
+
* @property { string } groupId 设备分组
|
|
17
|
+
* @property { 'output' | 'input' } direction 设备方向
|
|
18
|
+
* @value output 输出设备
|
|
19
|
+
* @value input 输入设备
|
|
20
|
+
* @property { 'audioinput' | 'audiooutput' | 'videoinput' } kind 设备种类
|
|
21
|
+
* @value audioinput 音频输入
|
|
22
|
+
* @value audiooutput 音频输出
|
|
23
|
+
* @value videoinput 摄像头输入
|
|
24
|
+
* @property { string } type 设备采集流类型:video/audio
|
|
25
|
+
*/
|
|
26
|
+
export declare type IDeviceInfo = {
|
|
27
|
+
deviceId: string;
|
|
28
|
+
label: string;
|
|
29
|
+
groupId?: string;
|
|
30
|
+
direction?: 'output' | 'input';
|
|
31
|
+
kind?: 'audioinput' | 'audiooutput' | 'videoinput';
|
|
32
|
+
type?: 'video' | 'audio';
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* 设备列表:麦克风、扬声器、摄像头
|
|
36
|
+
*
|
|
37
|
+
* @property { IDeviceInfo[] } audioInputList 麦克风列表
|
|
38
|
+
* @property { IDeviceInfo[] } audioOutputList 扬声器列表
|
|
39
|
+
* @property { IDeviceInfo[] } videoInList 摄像头列表
|
|
40
|
+
*/
|
|
41
|
+
export declare type IDeviceList = {
|
|
42
|
+
audioInputList: IDeviceInfo[];
|
|
43
|
+
audioOutputList: IDeviceInfo[];
|
|
44
|
+
videoInList: IDeviceInfo[];
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* 当前已选择设备信息
|
|
48
|
+
*
|
|
49
|
+
* @property { IDeviceInfo | undefined } audioInput 麦克风设备
|
|
50
|
+
* @property { IDeviceInfo | undefined } audioOutput 扬声器设备
|
|
51
|
+
* @property { IDeviceInfo | undefined } videoInput 摄像头设备
|
|
52
|
+
*/
|
|
53
|
+
export declare type ISelectedDevice = {
|
|
54
|
+
audioInput: IDeviceInfo | undefined;
|
|
55
|
+
videoInput: IDeviceInfo | undefined;
|
|
56
|
+
audioOutput: IDeviceInfo | undefined;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* 设备变化事件
|
|
60
|
+
*
|
|
61
|
+
* @property { ISelectedDevice } nextDevice 最新的设备
|
|
62
|
+
* @property { IDeviceList } detail 最新设备详细信息
|
|
63
|
+
*/
|
|
64
|
+
export declare type IDeviceManagerChangeValue = {
|
|
65
|
+
nextDevice: ISelectedDevice;
|
|
66
|
+
detail: IDeviceList;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* 当前麦克风/摄像头权限
|
|
70
|
+
*
|
|
71
|
+
* @property { TPermissionType } microphone 麦克风权限
|
|
72
|
+
* @property { TPermissionType } camera 摄像头权限
|
|
73
|
+
*/
|
|
74
|
+
export interface ICurrentPermission {
|
|
75
|
+
microphone: TPermissionType;
|
|
76
|
+
camera: TPermissionType;
|
|
77
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WebRTC SDK Lib TypeScript Declare
|
|
3
|
-
*
|
|
4
|
-
* @authors luojinghui (luojinghui424@gmail.com)
|
|
5
|
-
* chengfei (chengfei@xylink.com)
|
|
6
|
-
* @date 2019-10-23 12:02:33
|
|
7
|
-
*/
|
|
8
|
-
export * from './base';
|
|
9
|
-
export * from './client';
|
|
10
|
-
export * from './stream';
|
|
11
|
-
export * from './device';
|
|
1
|
+
/**
|
|
2
|
+
* WebRTC SDK Lib TypeScript Declare
|
|
3
|
+
*
|
|
4
|
+
* @authors luojinghui (luojinghui424@gmail.com)
|
|
5
|
+
* chengfei (chengfei@xylink.com)
|
|
6
|
+
* @date 2019-10-23 12:02:33
|
|
7
|
+
*/
|
|
8
|
+
export * from './base';
|
|
9
|
+
export * from './client';
|
|
10
|
+
export * from './stream';
|
|
11
|
+
export * from './device';
|
|
12
|
+
export * from './action';
|
|
13
|
+
export * from './meeting';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Meeting Lib Type Defined
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2022-10-27 18:13:24
|
|
5
|
+
* Last modified : 2022-10-27 19:25:49
|
|
6
|
+
*/
|
|
7
|
+
import { ILoginInfo } from './client';
|
|
8
|
+
/**
|
|
9
|
+
* 呼叫号码的云会议室属性配置
|
|
10
|
+
*/
|
|
11
|
+
export interface IConfAuxPro {
|
|
12
|
+
watermark: string;
|
|
13
|
+
displayConfNo: string;
|
|
14
|
+
inoutReminder: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Calluriv2接口返回的部分对外数据信息
|
|
18
|
+
*/
|
|
19
|
+
export interface IConfCallInfo {
|
|
20
|
+
displayName: string;
|
|
21
|
+
numberType: string;
|
|
22
|
+
callUrl: string;
|
|
23
|
+
avatar: string;
|
|
24
|
+
deviceType: string;
|
|
25
|
+
deviceId: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 个人云会议室信息
|
|
29
|
+
* 默认只保存了部分信息
|
|
30
|
+
*/
|
|
31
|
+
export interface ICloudRoomConfig {
|
|
32
|
+
meetingControlPassword: string;
|
|
33
|
+
meetingNumber: string;
|
|
34
|
+
password: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 用户和对应个人云会议室信息数据
|
|
38
|
+
*/
|
|
39
|
+
export interface IExportUserInfo extends ILoginInfo {
|
|
40
|
+
cloudRoomInfo: ICloudRoomConfig;
|
|
41
|
+
}
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 会议质量上报 基础数据
|
|
3
|
-
*
|
|
4
|
-
* @property { string } callNumber 会议号callUri
|
|
5
|
-
* @property { string } deviceId
|
|
6
|
-
* @property { string } meetingId 会议ID
|
|
7
|
-
* @property { string } osVersion 终端系统版本; 目前上报的是navigator.userAgent
|
|
8
|
-
* @property { string } sockProto 终端接入协议方式 udpProto
|
|
9
|
-
* @property { string } swVersion 终端软件版本
|
|
10
|
-
* @property { string } cdrVersion 统计版本号 目前传的是10
|
|
11
|
-
* @property { string } deviceType 设备类型 17
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
export interface IMeetingQualityData {
|
|
15
|
-
callNumber: string;
|
|
16
|
-
deviceId: string;
|
|
17
|
-
meetingId: string;
|
|
18
|
-
osVersion: string;
|
|
19
|
-
sockProto: string;
|
|
20
|
-
swVersion: string;
|
|
21
|
-
cdrVersion: number;
|
|
22
|
-
deviceType: number;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* video 数据
|
|
26
|
-
*
|
|
27
|
-
* @property { number } fr 帧率
|
|
28
|
-
* @property { number } height 高
|
|
29
|
-
* @property { number } width 宽
|
|
30
|
-
*/
|
|
31
|
-
export interface IQualityVideoStream {
|
|
32
|
-
fr: number;
|
|
33
|
-
height: number;
|
|
34
|
-
width: number;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* 远端video数据
|
|
38
|
-
*
|
|
39
|
-
* @property { number } participantId
|
|
40
|
-
* @property { IQualityVideoStream[] } videoStream
|
|
41
|
-
*/
|
|
42
|
-
export interface IQualityRecvStreams {
|
|
43
|
-
participantId: number;
|
|
44
|
-
videoStream: IQualityVideoStream[];
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* 本地发送video数据
|
|
48
|
-
*
|
|
49
|
-
* @property { string } callUri
|
|
50
|
-
* @property { number } participantId
|
|
51
|
-
* @property { number } sessionId 媒体提供
|
|
52
|
-
* @property { IQualityVideoStream[] } audioStream
|
|
53
|
-
* @property { IQualityVideoStream[] } videoStream
|
|
54
|
-
*/
|
|
55
|
-
export interface IQualitySendStreams {
|
|
56
|
-
callUri: string;
|
|
57
|
-
participantId: number;
|
|
58
|
-
sessionId: number;
|
|
59
|
-
audioStream: IQualityVideoStream[];
|
|
60
|
-
videoStream: IQualityVideoStream[];
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* video质量相关数据 统计相同分辨率的路数、平均帧率
|
|
64
|
-
*
|
|
65
|
-
* @property { number } Height 分辨率-高
|
|
66
|
-
* @property { number } Width 分辨率-宽
|
|
67
|
-
* @property { number } framerate 当前分辨率4s内平均帧率
|
|
68
|
-
* @property { number } resNum 当前分辨率的路数
|
|
69
|
-
* @property { number } resolution 分辨率 【似乎没用】
|
|
70
|
-
*/
|
|
71
|
-
export interface IVideoQuality {
|
|
72
|
-
Height: number;
|
|
73
|
-
Width: number;
|
|
74
|
-
framerate: number;
|
|
75
|
-
resNum: number;
|
|
76
|
-
resolution: number;
|
|
77
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 会议质量上报 基础数据
|
|
3
|
+
*
|
|
4
|
+
* @property { string } callNumber 会议号callUri
|
|
5
|
+
* @property { string } deviceId
|
|
6
|
+
* @property { string } meetingId 会议ID
|
|
7
|
+
* @property { string } osVersion 终端系统版本; 目前上报的是navigator.userAgent
|
|
8
|
+
* @property { string } sockProto 终端接入协议方式 udpProto
|
|
9
|
+
* @property { string } swVersion 终端软件版本
|
|
10
|
+
* @property { string } cdrVersion 统计版本号 目前传的是10
|
|
11
|
+
* @property { string } deviceType 设备类型 17
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export interface IMeetingQualityData {
|
|
15
|
+
callNumber: string;
|
|
16
|
+
deviceId: string;
|
|
17
|
+
meetingId: string;
|
|
18
|
+
osVersion: string;
|
|
19
|
+
sockProto: string;
|
|
20
|
+
swVersion: string;
|
|
21
|
+
cdrVersion: number;
|
|
22
|
+
deviceType: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* video 数据
|
|
26
|
+
*
|
|
27
|
+
* @property { number } fr 帧率
|
|
28
|
+
* @property { number } height 高
|
|
29
|
+
* @property { number } width 宽
|
|
30
|
+
*/
|
|
31
|
+
export interface IQualityVideoStream {
|
|
32
|
+
fr: number;
|
|
33
|
+
height: number;
|
|
34
|
+
width: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 远端video数据
|
|
38
|
+
*
|
|
39
|
+
* @property { number } participantId
|
|
40
|
+
* @property { IQualityVideoStream[] } videoStream
|
|
41
|
+
*/
|
|
42
|
+
export interface IQualityRecvStreams {
|
|
43
|
+
participantId: number;
|
|
44
|
+
videoStream: IQualityVideoStream[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 本地发送video数据
|
|
48
|
+
*
|
|
49
|
+
* @property { string } callUri
|
|
50
|
+
* @property { number } participantId
|
|
51
|
+
* @property { number } sessionId 媒体提供
|
|
52
|
+
* @property { IQualityVideoStream[] } audioStream
|
|
53
|
+
* @property { IQualityVideoStream[] } videoStream
|
|
54
|
+
*/
|
|
55
|
+
export interface IQualitySendStreams {
|
|
56
|
+
callUri: string;
|
|
57
|
+
participantId: number;
|
|
58
|
+
sessionId: number;
|
|
59
|
+
audioStream: IQualityVideoStream[];
|
|
60
|
+
videoStream: IQualityVideoStream[];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* video质量相关数据 统计相同分辨率的路数、平均帧率
|
|
64
|
+
*
|
|
65
|
+
* @property { number } Height 分辨率-高
|
|
66
|
+
* @property { number } Width 分辨率-宽
|
|
67
|
+
* @property { number } framerate 当前分辨率4s内平均帧率
|
|
68
|
+
* @property { number } resNum 当前分辨率的路数
|
|
69
|
+
* @property { number } resolution 分辨率 【似乎没用】
|
|
70
|
+
*/
|
|
71
|
+
export interface IVideoQuality {
|
|
72
|
+
Height: number;
|
|
73
|
+
Width: number;
|
|
74
|
+
framerate: number;
|
|
75
|
+
resNum: number;
|
|
76
|
+
resolution: number;
|
|
77
|
+
}
|