replicas-computer 0.3.25 → 0.3.26
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.js +1 -1
- package/dist/stream-viewer.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
package/dist/stream-viewer.js
CHANGED
|
@@ -1031,9 +1031,8 @@ var updateDiagnostics = (stats) => {
|
|
|
1031
1031
|
viewerEvents.length ? `viewer events: ${describeEvents(viewerEvents.slice(-5))}` : ""
|
|
1032
1032
|
].filter(Boolean).join("\n");
|
|
1033
1033
|
};
|
|
1034
|
-
var sampleConnection = (stats, current, now) => {
|
|
1034
|
+
var sampleConnection = (stats, current, now, shown) => {
|
|
1035
1035
|
const totals = connectionTotals;
|
|
1036
|
-
const shown = !standby && document.visibilityState === "visible" && qualityUnseen.samples < 4;
|
|
1037
1036
|
if (shown && totals.sampledAt) {
|
|
1038
1037
|
totals.shownSince ??= totals.sampledAt;
|
|
1039
1038
|
totals.shownMs += now - totals.sampledAt;
|
|
@@ -1063,8 +1062,9 @@ var reportQuality = (stats) => {
|
|
|
1063
1062
|
const current = qualityWindow ??= { at: now, presented: presentedFrames, freezes: inbound?.freezeCount ?? 0, longestGapMs: 0 };
|
|
1064
1063
|
const decoded = transport === "webrtc" ? inbound?.framesDecoded ?? 0 : socketDecodedFrames;
|
|
1065
1064
|
qualityUnseen = { decoded, presented: presentedFrames, samples: decoded > qualityUnseen.decoded && presentedFrames === qualityUnseen.presented ? qualityUnseen.samples + 1 : 0 };
|
|
1066
|
-
|
|
1067
|
-
|
|
1065
|
+
const shown = !standby && document.visibilityState === "visible" && qualityUnseen.samples < 4;
|
|
1066
|
+
if (!shown) current.unseen = true;
|
|
1067
|
+
sampleConnection(stats, telemetry, now, shown);
|
|
1068
1068
|
qualitySamples.push({ stats, telemetry });
|
|
1069
1069
|
const windowMs = now - current.at;
|
|
1070
1070
|
if (windowMs < qualityWindowMs) return;
|