@xylink/xy-rtc-sdk 2.1.1 → 2.1.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.
@@ -158,7 +158,7 @@ export interface ISource {
158
158
  * @value { string } devices.videoInValue 视频输入
159
159
  * @value { string } devices.audioOutputValue 音频输出
160
160
  */
161
- export declare type IStreamInitConfog = {
161
+ export declare type IStreamInitConfig = {
162
162
  devices: {
163
163
  audioInputValue?: string;
164
164
  videoInValue?: string;
@@ -172,18 +172,31 @@ export declare type IStreamInitConfog = {
172
172
  * @property { number } bytesReceivedSecond 每秒接收字节数
173
173
  * @property { number } bytesSent 发送的字节总数
174
174
  * @property { number } bytesSentSecond 每秒发送字节数
175
+ * @property { number } jitterSent 发送的抖动(ms)
176
+ * @property { number } jitterReceived 接受的抖动(ms)
177
+ * @property { number } roundTripTime 往返延时 (ms)
178
+ * @property { number } fractionLostSent 视频发送的丢包率
179
+ * @property { number } fractionLostReceived 视频接受的丢包率
175
180
  * @property { string } mimeType 视频类型
176
181
  * @property { number } timestamp 时间戳
177
182
  * @property { [prop: string]: IReceiver } receiver 所有接收视频的列表数据
178
183
  * @property { [prop: string]: ISender } sender 所有发送视频的列表数据
179
184
  * @property { [prop: string]: IReceiver } audioReceiver 所有接收音频的列表数据
180
185
  * @property { [prop: string]: ISender } audioSender 所有发送音频的列表数据
186
+ * @property { number } audioSendLost 音频发送的丢包率
187
+ * @property { number } audioRecvLost 音频接受的丢包率
181
188
  */
182
189
  export interface IInternels {
183
190
  bytesReceived: number;
184
191
  bytesReceivedSecond: number;
185
192
  bytesSent: number;
186
193
  bytesSentSecond: number;
194
+ jitterSent: number;
195
+ jitterReceived: number;
196
+ audioSendJitter: number;
197
+ roundTripTime: number;
198
+ fractionLostSent: number;
199
+ fractionLostReceived: number;
187
200
  mimeType: string;
188
201
  timestamp: number;
189
202
  receiver: {
@@ -198,6 +211,8 @@ export interface IInternels {
198
211
  audioSender: {
199
212
  [prop: string]: ISender;
200
213
  };
214
+ audioSendLost?: number;
215
+ audioRecvLost?: number;
201
216
  }
202
217
  /**
203
218
  * 接收器 Receiver 统计数据
@@ -218,6 +233,9 @@ export interface IInternels {
218
233
  * @property { number } nackCount 计算此接收器发送的否定确认(NACK)数据包的总数
219
234
  * @property { string } name 与会者昵称
220
235
  * @property { number } packetsReceived 此传输上收到的数据包总数
236
+ * @property { number } packetsReceivedSecond 此传输上每秒收到的数据包数量
237
+ * @property { number } packetsLost 此传输上丢失的数据包总数
238
+ * @property { number } packetsLostSecond 此传输上每秒丢失的数据包数量
221
239
  * @property { number } pliCount 接收器发送的图片丢失指示(PLI)数据包的总数
222
240
  * @property { number } timestamp 时间戳
223
241
  * @property { string } type 与会者type
@@ -230,6 +248,9 @@ export interface IInternels {
230
248
  * @property { number } jitter 视频接收抖动
231
249
  * @property { string } endpointId 参会者的callUri
232
250
  * @property { string } participantId participantId
251
+ * @property { number } totalSamplesReceived 总的接受采样点
252
+ * @property { number } insertedSamplesForDeceleration
253
+ * @property { number } removedSamplesForAcceleration
233
254
  */
234
255
  export interface IReceiver {
235
256
  bytesReceived: number;
@@ -247,6 +268,9 @@ export interface IReceiver {
247
268
  nackCount: number;
248
269
  name: string;
249
270
  packetsReceived: number;
271
+ packetsReceivedSecond: number;
272
+ packetsLost: number;
273
+ packetsLostSecond: number;
250
274
  pliCount: number;
251
275
  timestamp: number;
252
276
  type: string;
@@ -260,6 +284,14 @@ export interface IReceiver {
260
284
  participantId?: number;
261
285
  mimeType?: string;
262
286
  audioLevel?: number;
287
+ insertedSamplesForDeceleration?: number;
288
+ insertedSamplesForDecelerationSecond?: number;
289
+ totalSamplesReceived?: number;
290
+ totalSamplesReceivedSecond?: number;
291
+ removedSamplesForAcceleration?: number;
292
+ removedSamplesForAccelerationSecond?: number;
293
+ ExpectWidth?: number;
294
+ ExpectHeight?: number;
263
295
  }
264
296
  /**
265
297
  * 发送器 Sender 统计数据
@@ -277,15 +309,21 @@ export interface IReceiver {
277
309
  * @property { string } status 忽略
278
310
  * @property { number } keyFramesEncoded 此RTP媒体流编码的关键帧总数
279
311
  * @property { number } packetsSent 此传输发送的数据包总数
312
+ * @property { number } packetsSentSecond 此传输每秒发送的数据包数
280
313
  * @property { number } timestamp 时间戳
281
314
  * @property { string } type 发送器类型
282
315
  * @property { number } expBandwidth 期望带宽
283
316
  * @property { string } string 分辨率
284
317
  * @property { number } pliCount 计算此发送方收到的图片丢失指示 (PLI) 数据包的总数
318
+ * @property { number } firCount 接收方已向发送方发送的完整帧内请求 (FIR) 数据包的数量
285
319
  * @property { number } nackCount 计算此发送方收到的否定确认 (NACK) 数据包的总数
286
320
  * @property { string } ssrc 标识此 stats 对象正在描述的 RTP 数据包流;
287
321
  * 对于出站和入站本地,ssrc 描述了分别由这些端点发送和接收的轨道的统计信息;
288
322
  * 对于远程入站和远程出站,ssrc 描述了由远程端点接收和发送到远程端点的轨道的统计信息;
323
+ * @property { number } packetsLost 丢包总数
324
+ * @property { boolean } isContent 是否是分享content
325
+ * @property { boolean } jitter jitter
326
+ * @property { boolean } roundTripTime 往返延时
289
327
  */
290
328
  export interface ISender {
291
329
  bytesSent: number;
@@ -300,15 +338,22 @@ export interface ISender {
300
338
  status: string;
301
339
  keyFramesEncoded: number;
302
340
  packetsSent: number;
341
+ packetsSentSecond: number;
303
342
  timestamp: number;
304
343
  type: string;
305
344
  expBandwidth: number;
306
345
  resolution: string;
307
346
  pliCount: number;
347
+ firCount: number;
308
348
  nackCount: number;
309
349
  ssrc: string;
310
350
  mimeType: string;
311
351
  audioLevel?: number;
352
+ packetsLost: number;
353
+ packetsLostSecond: number;
354
+ isContent?: boolean;
355
+ jitter?: number;
356
+ roundTripTime?: number;
312
357
  }
313
358
  /**
314
359
  * 基础视频约束配置
@@ -316,11 +361,15 @@ export interface ISender {
316
361
  * @property { ConstrainDouble } frameRate 帧率配置
317
362
  * @property { number } aspectRatio 视频比例
318
363
  * @property { 'crop-and-scale' } resizeMode 裁剪模式,此处使用裁剪比例模式,以满足分辨率要求;
364
+ * @property { number } width 采集分辨率-width
365
+ * @property { number } height 采集分辨率-height
319
366
  */
320
367
  export interface IBASE_CONTRAINTS {
321
368
  frameRate?: ConstrainDouble;
322
369
  aspectRatio: number;
323
370
  resizeMode: 'crop-and-scale';
371
+ width?: number;
372
+ height?: number;
324
373
  }
325
374
  /**
326
375
  * 初始化视频约束设置
@@ -368,8 +417,8 @@ export interface IStreamChangeType {
368
417
  /**
369
418
  * 缓存content和people的StreamChange配置数据
370
419
  *
371
- * @property { IStreamChange[] } content content的streamchange数据
372
- * @property { IStreamChange[] } people content的streamchange数据
420
+ * @property { IStreamChange[] } content content的streamChange数据
421
+ * @property { IStreamChange[] } people content的streamChange数据
373
422
  */
374
423
  export interface IStreamChangeListType {
375
424
  content: IStreamChange[];
package/package.json CHANGED
@@ -1,130 +1,130 @@
1
- {
2
- "name": "@xylink/xy-rtc-sdk",
3
- "version": "2.1.1",
4
- "description": "XYRTC SDK(小鱼易连web音视频 sdk)",
5
- "keywords": [
6
- "webrtc",
7
- "xylink",
8
- "xyrtc",
9
- "xyrtc sdk"
10
- ],
11
- "main": "lib/index.js",
12
- "types": "lib/src/index.d.ts",
13
- "scripts": {
14
- "start": "vite",
15
- "dev": "vite",
16
- "build:demo": "tsc && vite build",
17
- "preview": "vite preview",
18
- "build-watch": "rollup -c -w",
19
- "build": "NODE_ENV=production rollup -c",
20
- "test": "jest",
21
- "version:beta": "npm version prerelease --preid=beta",
22
- "publish:beta": "npm publish --tag beta --access public",
23
- "xytools": "xytools"
24
- },
25
- "author": "jinghui-Luo",
26
- "email": "luojinghui424@gmail.com",
27
- "bugs": {
28
- "url": "https://github.com/xylink-com/xylink-rtc-demo/issues",
29
- "email": "luojinghui424@gmail.com"
30
- },
31
- "devDependencies": {
32
- "@babel/core": "^7.7.4",
33
- "@babel/plugin-proposal-class-properties": "^7.7.4",
34
- "@babel/plugin-syntax-dynamic-import": "^7.7.4",
35
- "@babel/plugin-transform-typescript": "^7.7.4",
36
- "@babel/preset-env": "^7.7.4",
37
- "@babel/preset-react": "^7.6.3",
38
- "@babel/preset-typescript": "^7.7.4",
39
- "@rollup/plugin-node-resolve": "^7.0.0",
40
- "@rollup/plugin-replace": "^2.3.0",
41
- "@types/clone-deep": "^4.0.1",
42
- "@types/crypto-js": "^4.0.1",
43
- "@types/downloadjs": "^1.4.2",
44
- "@types/react": "^17.0.3",
45
- "@types/react-dom": "^17.0.6",
46
- "@types/uuid": "^8.3.0",
47
- "@typescript-eslint/eslint-plugin": "^2.9.0",
48
- "@typescript-eslint/parser": "^2.9.0",
49
- "@vitejs/plugin-react-refresh": "^1.3.2",
50
- "antd": "4.10.1",
51
- "axios": "^0.19.1",
52
- "babel-loader": "^8.0.6",
53
- "babel-plugin-import": "^1.12.2",
54
- "babel-polyfill": "^6.26.0",
55
- "babel-preset-env": "^1.7.0",
56
- "babel-preset-es2015": "^6.24.1",
57
- "babel-preset-react": "^6.24.1",
58
- "babel-preset-react-app": "^9.0.2",
59
- "clone-deep": "^4.0.1",
60
- "core-js": "^3.6.5",
61
- "downloadjs": "^1.4.7",
62
- "eslint": "^6.7.1",
63
- "eslint-config-alloy": "^3.4.0",
64
- "husky": "^4.3.8",
65
- "jest": "^25.1.0",
66
- "jszip": "^3.5.0",
67
- "less": "^3.10.3",
68
- "lint-staged": "^10.5.4",
69
- "prettier": "^1.19.1",
70
- "react": "^16.10.2",
71
- "react-dom": "^16.10.2",
72
- "rollup": "^2.44.0",
73
- "rollup-plugin-babel": "^4.3.3",
74
- "rollup-plugin-cleanup": "^3.2.1",
75
- "rollup-plugin-clear": "^2.0.7",
76
- "rollup-plugin-commonjs": "^10.1.0",
77
- "rollup-plugin-json": "^4.0.0",
78
- "rollup-plugin-sourcemaps": "^0.4.2",
79
- "rollup-plugin-terser": "^5.1.2",
80
- "rollup-plugin-typescript2": "^0.25.2",
81
- "sass": "^1.32.10",
82
- "typescript": "^4.3.2",
83
- "validate-commit-msg": "^2.14.0",
84
- "vconsole": "^3.3.4",
85
- "vite": "^2.6.13",
86
- "vite-plugin-imp": "^2.0.7",
87
- "vite-plugin-importer": "^0.2.1",
88
- "vite-plugin-svgr": "^1.1.0",
89
- "xytools": "1.5.2-beta.4"
90
- },
91
- "dependencies": {
92
- "crypto-browserify": "^3.12.0",
93
- "crypto-js": "^4.1.1",
94
- "dexie": "^2.0.4",
95
- "dexie-export-import": "^1.0.0-rc.1",
96
- "encryptlong": "^3.1.4",
97
- "js-base64": "^3.6.1",
98
- "qs": "^6.9.4",
99
- "uuid": "^7.0.2"
100
- },
101
- "husky": {
102
- "hooks": {
103
- "pre-commit": "lint-staged",
104
- "commit-msg": "validate-commit-msg"
105
- }
106
- },
107
- "config": {
108
- "validate-commit-msg": {
109
- "types": [
110
- "feat",
111
- "fix",
112
- "docs",
113
- "style",
114
- "refactor",
115
- "perf",
116
- "test",
117
- "build",
118
- "ci",
119
- "chore",
120
- "revert",
121
- "merge"
122
- ]
123
- }
124
- },
125
- "lint-staged": {
126
- "{src,demo}/**/*.{js,jsx,json,ts,tsx,scss,sass,css,md}": [
127
- "prettier --write"
128
- ]
129
- }
130
- }
1
+ {
2
+ "name": "@xylink/xy-rtc-sdk",
3
+ "version": "2.1.2",
4
+ "description": "XYRTC SDK(小鱼易连web音视频 sdk)",
5
+ "keywords": [
6
+ "webrtc",
7
+ "xylink",
8
+ "xyrtc",
9
+ "xyrtc sdk"
10
+ ],
11
+ "main": "lib/index.js",
12
+ "types": "lib/src/index.d.ts",
13
+ "scripts": {
14
+ "start": "vite",
15
+ "dev": "vite",
16
+ "build:demo": "tsc && vite build",
17
+ "preview": "vite preview",
18
+ "build-watch": "rollup -c -w",
19
+ "build": "NODE_ENV=production rollup -c",
20
+ "test": "jest",
21
+ "version:beta": "npm version prerelease --preid=beta",
22
+ "publish:beta": "npm publish --tag beta --access public",
23
+ "xytools": "xytools"
24
+ },
25
+ "author": "jinghui-Luo",
26
+ "email": "luojinghui424@gmail.com",
27
+ "bugs": {
28
+ "url": "https://github.com/xylink-com/xylink-rtc-demo/issues",
29
+ "email": "luojinghui424@gmail.com"
30
+ },
31
+ "devDependencies": {
32
+ "@babel/core": "^7.7.4",
33
+ "@babel/plugin-proposal-class-properties": "^7.7.4",
34
+ "@babel/plugin-syntax-dynamic-import": "^7.7.4",
35
+ "@babel/plugin-transform-typescript": "^7.7.4",
36
+ "@babel/preset-env": "^7.7.4",
37
+ "@babel/preset-react": "^7.6.3",
38
+ "@babel/preset-typescript": "^7.7.4",
39
+ "@rollup/plugin-node-resolve": "^7.0.0",
40
+ "@rollup/plugin-replace": "^2.3.0",
41
+ "@types/clone-deep": "^4.0.1",
42
+ "@types/crypto-js": "^4.0.1",
43
+ "@types/downloadjs": "^1.4.2",
44
+ "@types/react": "^17.0.3",
45
+ "@types/react-dom": "^17.0.6",
46
+ "@types/uuid": "^8.3.0",
47
+ "@typescript-eslint/eslint-plugin": "^2.9.0",
48
+ "@typescript-eslint/parser": "^2.9.0",
49
+ "@vitejs/plugin-react-refresh": "^1.3.2",
50
+ "antd": "4.10.1",
51
+ "axios": "^0.19.1",
52
+ "babel-loader": "^8.0.6",
53
+ "babel-plugin-import": "^1.12.2",
54
+ "babel-polyfill": "^6.26.0",
55
+ "babel-preset-env": "^1.7.0",
56
+ "babel-preset-es2015": "^6.24.1",
57
+ "babel-preset-react": "^6.24.1",
58
+ "babel-preset-react-app": "^9.0.2",
59
+ "clone-deep": "^4.0.1",
60
+ "core-js": "^3.6.5",
61
+ "downloadjs": "^1.4.7",
62
+ "eslint": "^6.7.1",
63
+ "eslint-config-alloy": "^3.4.0",
64
+ "husky": "^4.3.8",
65
+ "jest": "^25.1.0",
66
+ "jszip": "^3.5.0",
67
+ "less": "^3.10.3",
68
+ "lint-staged": "^10.5.4",
69
+ "prettier": "^1.19.1",
70
+ "react": "^16.10.2",
71
+ "react-dom": "^16.10.2",
72
+ "rollup": "^2.44.0",
73
+ "rollup-plugin-babel": "^4.3.3",
74
+ "rollup-plugin-cleanup": "^3.2.1",
75
+ "rollup-plugin-clear": "^2.0.7",
76
+ "rollup-plugin-commonjs": "^10.1.0",
77
+ "rollup-plugin-json": "^4.0.0",
78
+ "rollup-plugin-sourcemaps": "^0.4.2",
79
+ "rollup-plugin-terser": "^5.1.2",
80
+ "rollup-plugin-typescript2": "^0.25.2",
81
+ "sass": "^1.32.10",
82
+ "typescript": "^4.3.2",
83
+ "validate-commit-msg": "^2.14.0",
84
+ "vconsole": "^3.3.4",
85
+ "vite": "^2.6.13",
86
+ "vite-plugin-imp": "^2.0.7",
87
+ "vite-plugin-importer": "^0.2.1",
88
+ "vite-plugin-svgr": "^1.1.0",
89
+ "xytools": "1.5.2-beta.4"
90
+ },
91
+ "dependencies": {
92
+ "crypto-browserify": "^3.12.0",
93
+ "crypto-js": "^4.1.1",
94
+ "dexie": "^2.0.4",
95
+ "dexie-export-import": "^1.0.0-rc.1",
96
+ "encryptlong": "^3.1.4",
97
+ "js-base64": "^3.6.1",
98
+ "qs": "^6.9.4",
99
+ "uuid": "^7.0.2"
100
+ },
101
+ "husky": {
102
+ "hooks": {
103
+ "pre-commit": "lint-staged",
104
+ "commit-msg": "validate-commit-msg"
105
+ }
106
+ },
107
+ "config": {
108
+ "validate-commit-msg": {
109
+ "types": [
110
+ "feat",
111
+ "fix",
112
+ "docs",
113
+ "style",
114
+ "refactor",
115
+ "perf",
116
+ "test",
117
+ "build",
118
+ "ci",
119
+ "chore",
120
+ "revert",
121
+ "merge"
122
+ ]
123
+ }
124
+ },
125
+ "lint-staged": {
126
+ "{src,demo}/**/*.{js,jsx,json,ts,tsx,scss,sass,css,md}": [
127
+ "prettier --write"
128
+ ]
129
+ }
130
+ }