@xylink/xy-rtc-sdk 2.1.2-beta.7 → 3.8.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.MD +2 -37
  2. package/lib/{src/action → action}/index.d.ts +237 -230
  3. package/lib/{src/enum → enum}/contraints.d.ts +116 -115
  4. package/lib/{src/enum → enum}/errorCode.d.ts +880 -880
  5. package/lib/{src/enum → enum}/index.d.ts +137 -133
  6. package/lib/{src/index.d.ts → index.d.ts} +34 -34
  7. package/lib/{src/main → main}/client.d.ts +878 -797
  8. package/lib/{src/main → main}/deviceManager.d.ts +164 -165
  9. package/lib/{src/main → main}/helper.d.ts +51 -51
  10. package/lib/{src/main → main}/iauth.d.ts +33 -33
  11. package/lib/{src/main → main}/layoutManager.d.ts +214 -214
  12. package/lib/{src/main → main}/peer.d.ts +311 -295
  13. package/lib/{src/main → main}/qualityManager.d.ts +39 -39
  14. package/lib/{src/main → main}/stream.d.ts +263 -243
  15. package/lib/{src/main → main}/videoManager.d.ts +65 -65
  16. package/lib/{src/tools → tools}/audioLevel.d.ts +23 -23
  17. package/lib/{src/tools → tools}/browser.d.ts +55 -55
  18. package/lib/{src/tools → tools}/config.d.ts +12 -12
  19. package/lib/{src/tools → tools}/db.d.ts +85 -84
  20. package/lib/tools/detect.d.ts +44 -0
  21. package/lib/{src/tools → tools}/emmitter.d.ts +15 -15
  22. package/lib/{src/tools → tools}/enum.d.ts +6 -6
  23. package/lib/{src/tools → tools}/httpClient.d.ts +64 -61
  24. package/lib/{src/tools → tools}/i18n.d.ts +8 -8
  25. package/lib/{src/tools → tools}/index.d.ts +8 -3
  26. package/lib/{src/tools → tools}/logger.d.ts +151 -151
  27. package/lib/{src/tools → tools}/socket.d.ts +53 -50
  28. package/lib/{src/tools → tools}/store.d.ts +15 -15
  29. package/lib/{src/tools → tools}/template.d.ts +14 -14
  30. package/lib/{src/tools → tools}/utils.d.ts +73 -67
  31. package/lib/{src/tools → tools}/verify.d.ts +7 -7
  32. package/lib/{src/type → type}/base.d.ts +71 -67
  33. package/lib/{src/type → type}/client.d.ts +1121 -1106
  34. package/lib/{src/type → type}/device.d.ts +77 -77
  35. package/lib/{src/type → type}/index.d.ts +11 -11
  36. package/lib/{src/type → type}/quality.d.ts +77 -77
  37. package/lib/{src/type → type}/stream.d.ts +426 -422
  38. package/lib/xyrtc.cjs.js +1 -0
  39. package/lib/xyrtc.umd.js +1 -0
  40. package/package.json +43 -54
  41. package/scripts/build_lib.js +16 -0
  42. package/scripts/utils.js +27 -0
  43. package/scripts/webpack.common.js +139 -0
  44. package/scripts/webpack.dev.js +27 -0
  45. package/scripts/webpack.sdk.js +68 -0
  46. package/tsconfig.lib.json +37 -0
  47. package/lib/index.es.js +0 -3
  48. package/lib/index.js +0 -3
  49. package/lib/src/tools/detect.d.ts +0 -19
@@ -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,11 @@
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';
@@ -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
+ }