@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,133 +1,137 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* webrtc sdk enum type
|
|
3
|
-
*
|
|
4
|
-
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
|
-
* @date 2019-10-30 14:12:52
|
|
6
|
-
*/
|
|
7
|
-
import { IDefault, IMUTE_MAP, ITemplateMode, IContentTemplateMode, IRoster } from '../type';
|
|
8
|
-
export * from './contraints';
|
|
9
|
-
export declare const LOG_CACHE_COUNT = 10;
|
|
10
|
-
export declare const DB_TABLE_COUNT = 10;
|
|
11
|
-
export declare const DETECT_LOCATOR_SERVER_NAME = "WebrtcSigGW";
|
|
12
|
-
export declare const MIME_TYPE = "video/H264";
|
|
13
|
-
export declare const DEVICE_TYPE = 17;
|
|
14
|
-
export declare const SELF_MOCK_PID = 9999999999;
|
|
15
|
-
export declare const STREAM_CHANNEL_COUNT = 11;
|
|
16
|
-
export declare const MAX_PARTICIPANT_COUNT = 112;
|
|
17
|
-
export declare const STREAM_ERROR_CODE_MAP: string[];
|
|
18
|
-
/**
|
|
19
|
-
* 支持呼叫的会议室类型
|
|
20
|
-
*/
|
|
21
|
-
export declare const SUPPORT_DEVICE_TYPE: string[];
|
|
22
|
-
/**
|
|
23
|
-
* media类型
|
|
24
|
-
* 0: people
|
|
25
|
-
* 1: content
|
|
26
|
-
*/
|
|
27
|
-
export declare const MEDIAGROUPID: number[];
|
|
28
|
-
/**
|
|
29
|
-
* 请流质量, 帧率还受带宽、发送端能力综合决定
|
|
30
|
-
* 0: people 720P 15帧、1080P 15帧 / content 720P 5帧、 1080P 15帧
|
|
31
|
-
* 1: people 720P 30帧、1080P 60帧 / content 720P 30帧、 1080P 30帧
|
|
32
|
-
*/
|
|
33
|
-
export declare const QUALITY_TYPE: number[];
|
|
34
|
-
/**
|
|
35
|
-
* 分辨率
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
export declare const RESOLUTION_TYPE: number[];
|
|
39
|
-
/**
|
|
40
|
-
* 每页最大显示终端数
|
|
41
|
-
*/
|
|
42
|
-
export declare const MAX_PAGE_SIZE = 9;
|
|
43
|
-
/**
|
|
44
|
-
* 网络信息
|
|
45
|
-
*/
|
|
46
|
-
export declare const NETWORK_TYPE_MAP: {
|
|
47
|
-
[key: string]: number;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* 音视频状态
|
|
51
|
-
*/
|
|
52
|
-
export declare const MUTE_MAP: IMUTE_MAP;
|
|
53
|
-
export declare const CONFIGURATION: RTCConfiguration;
|
|
54
|
-
/**
|
|
55
|
-
* stop call 对应错误码
|
|
56
|
-
*/
|
|
57
|
-
export declare const NEW_CODE_MAP: {
|
|
58
|
-
[key: string]: string;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* roster数据
|
|
62
|
-
*/
|
|
63
|
-
export declare const DEFAULT_ROSTER: IRoster;
|
|
64
|
-
/**
|
|
65
|
-
* 初始化数据
|
|
66
|
-
*/
|
|
67
|
-
export declare const DEFAULT: IDefault;
|
|
68
|
-
/**
|
|
69
|
-
* 模板类型
|
|
70
|
-
*/
|
|
71
|
-
export declare const TEMPLATE_MODE: ITemplateMode[];
|
|
72
|
-
/**
|
|
73
|
-
* content 模板类型
|
|
74
|
-
*/
|
|
75
|
-
export declare const CONTENT_TEMPLATE_MODE: IContentTemplateMode[];
|
|
76
|
-
/**
|
|
77
|
-
* 非content 默认模板类型
|
|
78
|
-
*/
|
|
79
|
-
export declare const TEMPLATE_DEFAULT_MODE = "SPEAKER";
|
|
80
|
-
/**
|
|
81
|
-
* content 模板类型
|
|
82
|
-
*/
|
|
83
|
-
export declare const CONTENT_DEFAULT_TEMPLATE_MODE = "MULTI_PIC_CONTENT_HIGH_PRIORITY";
|
|
84
|
-
/**
|
|
85
|
-
* 用户类型
|
|
86
|
-
*/
|
|
87
|
-
export declare const APP_NAME: {
|
|
88
|
-
STANDARD_WEBRTC: string;
|
|
89
|
-
THIRD_WEBRTC: string;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* 音视频事件类型
|
|
93
|
-
*/
|
|
94
|
-
export declare const EVENT_TYPE_MAP: {
|
|
95
|
-
[key: string]: string;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* content audio offer 状态
|
|
99
|
-
*/
|
|
100
|
-
export declare const CONTENT_AUDIO_OFFER_STATE: {
|
|
101
|
-
NOT_SEND: number;
|
|
102
|
-
SEND: number;
|
|
103
|
-
SENDED: number;
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* 支持的分辨率
|
|
107
|
-
*/
|
|
108
|
-
export declare const SCALE_RESOLUTION_MAP: {
|
|
109
|
-
[key: string]: number;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* 隐身入会
|
|
113
|
-
*
|
|
114
|
-
* @enum
|
|
115
|
-
*
|
|
116
|
-
* @property { number } HIDE 隐身入会
|
|
117
|
-
* @property { number } SDKMonitor+hide sdk监会
|
|
118
|
-
*/
|
|
119
|
-
export declare const SDKMonitor: {
|
|
120
|
-
[key: string]: string;
|
|
121
|
-
};
|
|
122
|
-
/**
|
|
123
|
-
* 可支持的监会方式
|
|
124
|
-
*/
|
|
125
|
-
export declare const SDKMonitorList: string[];
|
|
126
|
-
/**
|
|
127
|
-
* 同传字幕: 本地支持的语言
|
|
128
|
-
*/
|
|
129
|
-
export declare const SupportLocalLanguages: readonly ["Chinese", "English"];
|
|
130
|
-
/**
|
|
131
|
-
* 日志中需要隐藏的关键词
|
|
132
|
-
*/
|
|
133
|
-
export declare const HIDE_KEY_INFOS: string[];
|
|
1
|
+
/**
|
|
2
|
+
* webrtc sdk enum type
|
|
3
|
+
*
|
|
4
|
+
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
|
+
* @date 2019-10-30 14:12:52
|
|
6
|
+
*/
|
|
7
|
+
import { IDefault, IMUTE_MAP, ITemplateMode, IContentTemplateMode, IRoster, IFeatureConfig } from '../type';
|
|
8
|
+
export * from './contraints';
|
|
9
|
+
export declare const LOG_CACHE_COUNT = 10;
|
|
10
|
+
export declare const DB_TABLE_COUNT = 10;
|
|
11
|
+
export declare const DETECT_LOCATOR_SERVER_NAME = "WebrtcSigGW";
|
|
12
|
+
export declare const MIME_TYPE = "video/H264";
|
|
13
|
+
export declare const DEVICE_TYPE = 17;
|
|
14
|
+
export declare const SELF_MOCK_PID = 9999999999;
|
|
15
|
+
export declare const STREAM_CHANNEL_COUNT = 11;
|
|
16
|
+
export declare const MAX_PARTICIPANT_COUNT = 112;
|
|
17
|
+
export declare const STREAM_ERROR_CODE_MAP: string[];
|
|
18
|
+
/**
|
|
19
|
+
* 支持呼叫的会议室类型
|
|
20
|
+
*/
|
|
21
|
+
export declare const SUPPORT_DEVICE_TYPE: string[];
|
|
22
|
+
/**
|
|
23
|
+
* media类型
|
|
24
|
+
* 0: people
|
|
25
|
+
* 1: content
|
|
26
|
+
*/
|
|
27
|
+
export declare const MEDIAGROUPID: number[];
|
|
28
|
+
/**
|
|
29
|
+
* 请流质量, 帧率还受带宽、发送端能力综合决定
|
|
30
|
+
* 0: people 720P 15帧、1080P 15帧 / content 720P 5帧、 1080P 15帧
|
|
31
|
+
* 1: people 720P 30帧、1080P 60帧 / content 720P 30帧、 1080P 30帧
|
|
32
|
+
*/
|
|
33
|
+
export declare const QUALITY_TYPE: number[];
|
|
34
|
+
/**
|
|
35
|
+
* 分辨率
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export declare const RESOLUTION_TYPE: number[];
|
|
39
|
+
/**
|
|
40
|
+
* 每页最大显示终端数
|
|
41
|
+
*/
|
|
42
|
+
export declare const MAX_PAGE_SIZE = 9;
|
|
43
|
+
/**
|
|
44
|
+
* 网络信息
|
|
45
|
+
*/
|
|
46
|
+
export declare const NETWORK_TYPE_MAP: {
|
|
47
|
+
[key: string]: number;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* 音视频状态
|
|
51
|
+
*/
|
|
52
|
+
export declare const MUTE_MAP: IMUTE_MAP;
|
|
53
|
+
export declare const CONFIGURATION: RTCConfiguration;
|
|
54
|
+
/**
|
|
55
|
+
* stop call 对应错误码
|
|
56
|
+
*/
|
|
57
|
+
export declare const NEW_CODE_MAP: {
|
|
58
|
+
[key: string]: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* roster数据
|
|
62
|
+
*/
|
|
63
|
+
export declare const DEFAULT_ROSTER: IRoster;
|
|
64
|
+
/**
|
|
65
|
+
* 初始化数据
|
|
66
|
+
*/
|
|
67
|
+
export declare const DEFAULT: IDefault;
|
|
68
|
+
/**
|
|
69
|
+
* 模板类型
|
|
70
|
+
*/
|
|
71
|
+
export declare const TEMPLATE_MODE: ITemplateMode[];
|
|
72
|
+
/**
|
|
73
|
+
* content 模板类型
|
|
74
|
+
*/
|
|
75
|
+
export declare const CONTENT_TEMPLATE_MODE: IContentTemplateMode[];
|
|
76
|
+
/**
|
|
77
|
+
* 非content 默认模板类型
|
|
78
|
+
*/
|
|
79
|
+
export declare const TEMPLATE_DEFAULT_MODE = "SPEAKER";
|
|
80
|
+
/**
|
|
81
|
+
* content 模板类型
|
|
82
|
+
*/
|
|
83
|
+
export declare const CONTENT_DEFAULT_TEMPLATE_MODE = "MULTI_PIC_CONTENT_HIGH_PRIORITY";
|
|
84
|
+
/**
|
|
85
|
+
* 用户类型
|
|
86
|
+
*/
|
|
87
|
+
export declare const APP_NAME: {
|
|
88
|
+
STANDARD_WEBRTC: string;
|
|
89
|
+
THIRD_WEBRTC: string;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* 音视频事件类型
|
|
93
|
+
*/
|
|
94
|
+
export declare const EVENT_TYPE_MAP: {
|
|
95
|
+
[key: string]: string;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* content audio offer 状态
|
|
99
|
+
*/
|
|
100
|
+
export declare const CONTENT_AUDIO_OFFER_STATE: {
|
|
101
|
+
NOT_SEND: number;
|
|
102
|
+
SEND: number;
|
|
103
|
+
SENDED: number;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* 支持的分辨率
|
|
107
|
+
*/
|
|
108
|
+
export declare const SCALE_RESOLUTION_MAP: {
|
|
109
|
+
[key: string]: number;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* 隐身入会
|
|
113
|
+
*
|
|
114
|
+
* @enum
|
|
115
|
+
*
|
|
116
|
+
* @property { number } HIDE 隐身入会
|
|
117
|
+
* @property { number } SDKMonitor+hide sdk监会
|
|
118
|
+
*/
|
|
119
|
+
export declare const SDKMonitor: {
|
|
120
|
+
[key: string]: string;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* 可支持的监会方式
|
|
124
|
+
*/
|
|
125
|
+
export declare const SDKMonitorList: string[];
|
|
126
|
+
/**
|
|
127
|
+
* 同传字幕: 本地支持的语言
|
|
128
|
+
*/
|
|
129
|
+
export declare const SupportLocalLanguages: readonly ["Chinese", "English"];
|
|
130
|
+
/**
|
|
131
|
+
* 日志中需要隐藏的关键词
|
|
132
|
+
*/
|
|
133
|
+
export declare const HIDE_KEY_INFOS: string[];
|
|
134
|
+
/**
|
|
135
|
+
* SDK功能控制开关
|
|
136
|
+
*/
|
|
137
|
+
export declare const DEFAULT_FEATURE_COFNIG: IFeatureConfig;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* XYLink WebRTC SDK Lib
|
|
3
|
-
*
|
|
4
|
-
* 主入口文件,提供 createClient、createStream、版本等基本信息和方法;
|
|
5
|
-
*
|
|
6
|
-
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
7
|
-
* @date 2019-10-14 18:20:28
|
|
8
|
-
*/
|
|
9
|
-
import Logger from './tools/logger';
|
|
10
|
-
import Client from './main/client';
|
|
11
|
-
import Stream from './main/stream';
|
|
12
|
-
import { IClientConfig, IConfig, TLocale, ICheckSystemRequirements } from './type';
|
|
13
|
-
import DeviceManager from './main/deviceManager';
|
|
14
|
-
import { getLayoutItemState, getVideoInfoByRotation, getLayoutRotateInfo, getSendSupportedCodec, detectLocator } from './main/helper';
|
|
15
|
-
interface IXyRTC {
|
|
16
|
-
version: string;
|
|
17
|
-
client: Client | null;
|
|
18
|
-
logger: Logger;
|
|
19
|
-
checkSupportWebRTC: () => Promise<ICheckSystemRequirements>;
|
|
20
|
-
checkSupportMobileWebRTC: () => Promise<ICheckSystemRequirements>;
|
|
21
|
-
checkSupportShareContent: () => boolean;
|
|
22
|
-
setLocale: (language: TLocale) => void;
|
|
23
|
-
createClient: (config: IClientConfig) => Client;
|
|
24
|
-
createStream: () => Stream;
|
|
25
|
-
setConfig: (config: IConfig) => void;
|
|
26
|
-
closePreviewStream: (stream: MediaStream) => void;
|
|
27
|
-
setOutputAudioDevice: (element: HTMLMediaElement, outputValue: string) => void;
|
|
28
|
-
render: void;
|
|
29
|
-
}
|
|
30
|
-
declare const xyRTC: IXyRTC;
|
|
31
|
-
export default xyRTC;
|
|
32
|
-
export { Client, Stream, DeviceManager, getLayoutItemState, getVideoInfoByRotation as getVideoInfoByRotaion, getLayoutRotateInfo, getSendSupportedCodec, detectLocator };
|
|
33
|
-
export * from './type';
|
|
34
|
-
export { ERROR_CODE } from './enum/errorCode';
|
|
1
|
+
/**
|
|
2
|
+
* XYLink WebRTC SDK Lib
|
|
3
|
+
*
|
|
4
|
+
* 主入口文件,提供 createClient、createStream、版本等基本信息和方法;
|
|
5
|
+
*
|
|
6
|
+
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
7
|
+
* @date 2019-10-14 18:20:28
|
|
8
|
+
*/
|
|
9
|
+
import Logger from './tools/logger';
|
|
10
|
+
import Client from './main/client';
|
|
11
|
+
import Stream from './main/stream';
|
|
12
|
+
import { IClientConfig, IConfig, TLocale, ICheckSystemRequirements } from './type';
|
|
13
|
+
import DeviceManager from './main/deviceManager';
|
|
14
|
+
import { getLayoutItemState, getVideoInfoByRotation, getLayoutRotateInfo, getSendSupportedCodec, detectLocator } from './main/helper';
|
|
15
|
+
interface IXyRTC {
|
|
16
|
+
version: string;
|
|
17
|
+
client: Client | null;
|
|
18
|
+
logger: Logger;
|
|
19
|
+
checkSupportWebRTC: () => Promise<ICheckSystemRequirements>;
|
|
20
|
+
checkSupportMobileWebRTC: () => Promise<ICheckSystemRequirements>;
|
|
21
|
+
checkSupportShareContent: () => boolean;
|
|
22
|
+
setLocale: (language: TLocale) => void;
|
|
23
|
+
createClient: (config: IClientConfig) => Client;
|
|
24
|
+
createStream: () => Stream;
|
|
25
|
+
setConfig: (config: IConfig) => void;
|
|
26
|
+
closePreviewStream: (stream: MediaStream) => void;
|
|
27
|
+
setOutputAudioDevice: (element: HTMLMediaElement, outputValue: string) => void;
|
|
28
|
+
render: void;
|
|
29
|
+
}
|
|
30
|
+
declare const xyRTC: IXyRTC;
|
|
31
|
+
export default xyRTC;
|
|
32
|
+
export { Client, Stream, DeviceManager, getLayoutItemState, getVideoInfoByRotation as getVideoInfoByRotaion, getLayoutRotateInfo, getSendSupportedCodec, detectLocator };
|
|
33
|
+
export * from './type';
|
|
34
|
+
export { ERROR_CODE } from './enum/errorCode';
|