@whereby.com/media 9.3.1 → 9.4.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/dist/index.cjs +17 -6
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +17 -6
- package/dist/legacy-esm.js +17 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1457,6 +1457,8 @@ function captureVideoSsrcMetrics(ssrcMetrics, currentSsrcStats, prevSsrcStats, t
|
|
|
1457
1457
|
ssrcMetrics.fps = (frameCountDiff * 1000) / timeDiff;
|
|
1458
1458
|
const freezeCountDiff = (currentSsrcStats.freezeCount || 0) - ((prevSsrcStats === null || prevSsrcStats === void 0 ? void 0 : prevSsrcStats.freezeCount) || 0);
|
|
1459
1459
|
ssrcMetrics.freezeRate = (freezeCountDiff * 1000) / timeDiff;
|
|
1460
|
+
const freezeDurationDiff = (currentSsrcStats.totalFreezesDuration || 0) - ((prevSsrcStats === null || prevSsrcStats === void 0 ? void 0 : prevSsrcStats.totalFreezesDuration) || 0);
|
|
1461
|
+
ssrcMetrics.freezeFraction = (freezeDurationDiff * 1000) / timeDiff;
|
|
1460
1462
|
}
|
|
1461
1463
|
else {
|
|
1462
1464
|
const kfCountDiff = currentSsrcStats.keyFramesEncoded - ((prevSsrcStats === null || prevSsrcStats === void 0 ? void 0 : prevSsrcStats.keyFramesEncoded) || 0);
|
|
@@ -6052,6 +6054,7 @@ const createQualityDetector = (type) => {
|
|
|
6052
6054
|
const maxSideReceived = Math.max(ssrc0.width || 0, ssrc0.height || 0);
|
|
6053
6055
|
const fpsReceived = ssrc0.fps || 0;
|
|
6054
6056
|
const hadFreeze = !!ssrc0.freezeRate;
|
|
6057
|
+
const freezeFraction = ssrc0.freezeFraction || 0;
|
|
6055
6058
|
const bitrate = ssrc0.bitrate || 0;
|
|
6056
6059
|
if (maxSideRendered < 100) {
|
|
6057
6060
|
if (type === "warning" && maxSideReceived < 160)
|
|
@@ -6076,8 +6079,12 @@ const createQualityDetector = (type) => {
|
|
|
6076
6079
|
return true;
|
|
6077
6080
|
if (type === "critical" && fpsReceived < 9)
|
|
6078
6081
|
return true;
|
|
6079
|
-
if (hadFreeze)
|
|
6080
|
-
|
|
6082
|
+
if (hadFreeze) {
|
|
6083
|
+
if (type === "warning" && freezeFraction > 0.3)
|
|
6084
|
+
return true;
|
|
6085
|
+
if (type === "critical" && freezeFraction > 0.6)
|
|
6086
|
+
return true;
|
|
6087
|
+
}
|
|
6081
6088
|
if (type === "warning" && bitrate < 50000)
|
|
6082
6089
|
return true;
|
|
6083
6090
|
if (type === "critical" && bitrate < 20000)
|
|
@@ -6096,8 +6103,12 @@ const createQualityDetector = (type) => {
|
|
|
6096
6103
|
return true;
|
|
6097
6104
|
if (type === "critical" && bitrate < 50000)
|
|
6098
6105
|
return true;
|
|
6099
|
-
if (hadFreeze)
|
|
6100
|
-
|
|
6106
|
+
if (hadFreeze) {
|
|
6107
|
+
if (type === "warning" && freezeFraction > 0.2)
|
|
6108
|
+
return true;
|
|
6109
|
+
if (type === "critical" && freezeFraction > 0.4)
|
|
6110
|
+
return true;
|
|
6111
|
+
}
|
|
6101
6112
|
}
|
|
6102
6113
|
}
|
|
6103
6114
|
}
|
|
@@ -6108,9 +6119,9 @@ const createQualityDetector = (type) => {
|
|
|
6108
6119
|
const deceleration = ssrc0.audioDeceleration || 0;
|
|
6109
6120
|
const audioDistortion = concealment + acceleration + deceleration;
|
|
6110
6121
|
if (audioLevel >= 0.01) {
|
|
6111
|
-
if (type === "warning" && audioDistortion > 0.
|
|
6122
|
+
if (type === "warning" && audioDistortion > 0.15)
|
|
6112
6123
|
return true;
|
|
6113
|
-
if (type === "critical" && audioDistortion > 0.
|
|
6124
|
+
if (type === "critical" && audioDistortion > 0.3)
|
|
6114
6125
|
return true;
|
|
6115
6126
|
}
|
|
6116
6127
|
}
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1437,6 +1437,8 @@ function captureVideoSsrcMetrics(ssrcMetrics, currentSsrcStats, prevSsrcStats, t
|
|
|
1437
1437
|
ssrcMetrics.fps = (frameCountDiff * 1000) / timeDiff;
|
|
1438
1438
|
const freezeCountDiff = (currentSsrcStats.freezeCount || 0) - ((prevSsrcStats === null || prevSsrcStats === void 0 ? void 0 : prevSsrcStats.freezeCount) || 0);
|
|
1439
1439
|
ssrcMetrics.freezeRate = (freezeCountDiff * 1000) / timeDiff;
|
|
1440
|
+
const freezeDurationDiff = (currentSsrcStats.totalFreezesDuration || 0) - ((prevSsrcStats === null || prevSsrcStats === void 0 ? void 0 : prevSsrcStats.totalFreezesDuration) || 0);
|
|
1441
|
+
ssrcMetrics.freezeFraction = (freezeDurationDiff * 1000) / timeDiff;
|
|
1440
1442
|
}
|
|
1441
1443
|
else {
|
|
1442
1444
|
const kfCountDiff = currentSsrcStats.keyFramesEncoded - ((prevSsrcStats === null || prevSsrcStats === void 0 ? void 0 : prevSsrcStats.keyFramesEncoded) || 0);
|
|
@@ -6032,6 +6034,7 @@ const createQualityDetector = (type) => {
|
|
|
6032
6034
|
const maxSideReceived = Math.max(ssrc0.width || 0, ssrc0.height || 0);
|
|
6033
6035
|
const fpsReceived = ssrc0.fps || 0;
|
|
6034
6036
|
const hadFreeze = !!ssrc0.freezeRate;
|
|
6037
|
+
const freezeFraction = ssrc0.freezeFraction || 0;
|
|
6035
6038
|
const bitrate = ssrc0.bitrate || 0;
|
|
6036
6039
|
if (maxSideRendered < 100) {
|
|
6037
6040
|
if (type === "warning" && maxSideReceived < 160)
|
|
@@ -6056,8 +6059,12 @@ const createQualityDetector = (type) => {
|
|
|
6056
6059
|
return true;
|
|
6057
6060
|
if (type === "critical" && fpsReceived < 9)
|
|
6058
6061
|
return true;
|
|
6059
|
-
if (hadFreeze)
|
|
6060
|
-
|
|
6062
|
+
if (hadFreeze) {
|
|
6063
|
+
if (type === "warning" && freezeFraction > 0.3)
|
|
6064
|
+
return true;
|
|
6065
|
+
if (type === "critical" && freezeFraction > 0.6)
|
|
6066
|
+
return true;
|
|
6067
|
+
}
|
|
6061
6068
|
if (type === "warning" && bitrate < 50000)
|
|
6062
6069
|
return true;
|
|
6063
6070
|
if (type === "critical" && bitrate < 20000)
|
|
@@ -6076,8 +6083,12 @@ const createQualityDetector = (type) => {
|
|
|
6076
6083
|
return true;
|
|
6077
6084
|
if (type === "critical" && bitrate < 50000)
|
|
6078
6085
|
return true;
|
|
6079
|
-
if (hadFreeze)
|
|
6080
|
-
|
|
6086
|
+
if (hadFreeze) {
|
|
6087
|
+
if (type === "warning" && freezeFraction > 0.2)
|
|
6088
|
+
return true;
|
|
6089
|
+
if (type === "critical" && freezeFraction > 0.4)
|
|
6090
|
+
return true;
|
|
6091
|
+
}
|
|
6081
6092
|
}
|
|
6082
6093
|
}
|
|
6083
6094
|
}
|
|
@@ -6088,9 +6099,9 @@ const createQualityDetector = (type) => {
|
|
|
6088
6099
|
const deceleration = ssrc0.audioDeceleration || 0;
|
|
6089
6100
|
const audioDistortion = concealment + acceleration + deceleration;
|
|
6090
6101
|
if (audioLevel >= 0.01) {
|
|
6091
|
-
if (type === "warning" && audioDistortion > 0.
|
|
6102
|
+
if (type === "warning" && audioDistortion > 0.15)
|
|
6092
6103
|
return true;
|
|
6093
|
-
if (type === "critical" && audioDistortion > 0.
|
|
6104
|
+
if (type === "critical" && audioDistortion > 0.3)
|
|
6094
6105
|
return true;
|
|
6095
6106
|
}
|
|
6096
6107
|
}
|
package/dist/legacy-esm.js
CHANGED
|
@@ -1437,6 +1437,8 @@ function captureVideoSsrcMetrics(ssrcMetrics, currentSsrcStats, prevSsrcStats, t
|
|
|
1437
1437
|
ssrcMetrics.fps = (frameCountDiff * 1000) / timeDiff;
|
|
1438
1438
|
const freezeCountDiff = (currentSsrcStats.freezeCount || 0) - ((prevSsrcStats === null || prevSsrcStats === void 0 ? void 0 : prevSsrcStats.freezeCount) || 0);
|
|
1439
1439
|
ssrcMetrics.freezeRate = (freezeCountDiff * 1000) / timeDiff;
|
|
1440
|
+
const freezeDurationDiff = (currentSsrcStats.totalFreezesDuration || 0) - ((prevSsrcStats === null || prevSsrcStats === void 0 ? void 0 : prevSsrcStats.totalFreezesDuration) || 0);
|
|
1441
|
+
ssrcMetrics.freezeFraction = (freezeDurationDiff * 1000) / timeDiff;
|
|
1440
1442
|
}
|
|
1441
1443
|
else {
|
|
1442
1444
|
const kfCountDiff = currentSsrcStats.keyFramesEncoded - ((prevSsrcStats === null || prevSsrcStats === void 0 ? void 0 : prevSsrcStats.keyFramesEncoded) || 0);
|
|
@@ -6032,6 +6034,7 @@ const createQualityDetector = (type) => {
|
|
|
6032
6034
|
const maxSideReceived = Math.max(ssrc0.width || 0, ssrc0.height || 0);
|
|
6033
6035
|
const fpsReceived = ssrc0.fps || 0;
|
|
6034
6036
|
const hadFreeze = !!ssrc0.freezeRate;
|
|
6037
|
+
const freezeFraction = ssrc0.freezeFraction || 0;
|
|
6035
6038
|
const bitrate = ssrc0.bitrate || 0;
|
|
6036
6039
|
if (maxSideRendered < 100) {
|
|
6037
6040
|
if (type === "warning" && maxSideReceived < 160)
|
|
@@ -6056,8 +6059,12 @@ const createQualityDetector = (type) => {
|
|
|
6056
6059
|
return true;
|
|
6057
6060
|
if (type === "critical" && fpsReceived < 9)
|
|
6058
6061
|
return true;
|
|
6059
|
-
if (hadFreeze)
|
|
6060
|
-
|
|
6062
|
+
if (hadFreeze) {
|
|
6063
|
+
if (type === "warning" && freezeFraction > 0.3)
|
|
6064
|
+
return true;
|
|
6065
|
+
if (type === "critical" && freezeFraction > 0.6)
|
|
6066
|
+
return true;
|
|
6067
|
+
}
|
|
6061
6068
|
if (type === "warning" && bitrate < 50000)
|
|
6062
6069
|
return true;
|
|
6063
6070
|
if (type === "critical" && bitrate < 20000)
|
|
@@ -6076,8 +6083,12 @@ const createQualityDetector = (type) => {
|
|
|
6076
6083
|
return true;
|
|
6077
6084
|
if (type === "critical" && bitrate < 50000)
|
|
6078
6085
|
return true;
|
|
6079
|
-
if (hadFreeze)
|
|
6080
|
-
|
|
6086
|
+
if (hadFreeze) {
|
|
6087
|
+
if (type === "warning" && freezeFraction > 0.2)
|
|
6088
|
+
return true;
|
|
6089
|
+
if (type === "critical" && freezeFraction > 0.4)
|
|
6090
|
+
return true;
|
|
6091
|
+
}
|
|
6081
6092
|
}
|
|
6082
6093
|
}
|
|
6083
6094
|
}
|
|
@@ -6088,9 +6099,9 @@ const createQualityDetector = (type) => {
|
|
|
6088
6099
|
const deceleration = ssrc0.audioDeceleration || 0;
|
|
6089
6100
|
const audioDistortion = concealment + acceleration + deceleration;
|
|
6090
6101
|
if (audioLevel >= 0.01) {
|
|
6091
|
-
if (type === "warning" && audioDistortion > 0.
|
|
6102
|
+
if (type === "warning" && audioDistortion > 0.15)
|
|
6092
6103
|
return true;
|
|
6093
|
-
if (type === "critical" && audioDistortion > 0.
|
|
6104
|
+
if (type === "critical" && audioDistortion > 0.3)
|
|
6094
6105
|
return true;
|
|
6095
6106
|
}
|
|
6096
6107
|
}
|