From 11c669d5de38892d87b0b239d7b37664f21c61c8 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Fri, 21 Nov 2025 00:16:05 +0100 Subject: [PATCH] [mirotalk] - fixx typo --- public/js/networkStats.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/public/js/networkStats.js b/public/js/networkStats.js index 2dbf60da..bb2c8dc0 100644 --- a/public/js/networkStats.js +++ b/public/js/networkStats.js @@ -1,11 +1,11 @@ 'use strict'; /* - Fully correct WebRTC network stats collector. - - Supports audio + video - - Correct RTT (remote-inbound-rtp) - - Correct jitter (inbound-rtp) - - Multi-peer aggregation +Fully correct WebRTC network stats collector. + - Supports audio + video + - Correct RTT (remote-inbound-rtp) + - Correct jitter (inbound-rtp) + - Multi-peer aggregation */ const networkSent = document.getElementById('networkSent'); @@ -24,10 +24,8 @@ async function getNetworkStats(pc) { let bytesSent = 0; let bytesReceived = 0; let packetsLost = 0; - let jitterSum = 0; let jitterCount = 0; - let rttSum = 0; let rttCount = 0; @@ -47,7 +45,6 @@ async function getNetworkStats(pc) { if (report.type === 'inbound-rtp') { bytesReceived += report.bytesReceived || 0; packetsLost += report.packetsLost || 0; - if (report.jitter !== undefined) { jitterSum += report.jitter; jitterCount++; @@ -87,8 +84,6 @@ function showNetworkStats(stats) { networkJitter.innerText = stats.jitter.toFixed(3) + ' s'; networkPacketLost.innerText = stats.packetsLost; networkRtt.innerText = stats.rtt.toFixed(3) + ' s'; - - console.log('Network Stats:', stats); } /**