From 8e775918c73fce38a87990d4a29e08728ec081be Mon Sep 17 00:00:00 2001 From: eswarclynn Date: Wed, 27 Mar 2024 13:34:32 +0530 Subject: [PATCH] fix: cumulative values for packets lost and sent --- .../src/analytics/stats/PublishStatsAnalytics.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/hms-video-store/src/analytics/stats/PublishStatsAnalytics.ts b/packages/hms-video-store/src/analytics/stats/PublishStatsAnalytics.ts index 8f6df60b07..5d0cb0adf2 100644 --- a/packages/hms-video-store/src/analytics/stats/PublishStatsAnalytics.ts +++ b/packages/hms-video-store/src/analytics/stats/PublishStatsAnalytics.ts @@ -133,8 +133,8 @@ class RunningLocalTrackAnalytics extends RunningTrackAnalytics { avg_available_outgoing_bitrate_bps: this.calculateAverage('availableOutgoingBitrate'), avg_bitrate_bps: this.calculateAverage('bitrate'), avg_fps: this.calculateAverage('framesPerSecond'), - total_packets_lost: this.calculateDifferenceForSample('packetsLost'), - total_packets_sent: this.calculateDifferenceForSample('packetsSent'), + total_packets_lost: this.getLatestStat().packetsLost, + total_packets_sent: this.getLatestStat().packetsSent, total_packet_sent_delay_sec: parseFloat(this.calculateDifferenceForSample('totalPacketSendDelay').toFixed(4)), total_fir_count: this.calculateDifferenceForSample('firCount'), total_pli_count: this.calculateDifferenceForSample('pliCount'),