Fix stream stats display (#19874)

* Fix stats calculations and labels

* fix linter from complaining

* fix mse calc

* label
This commit is contained in:
Josh Hawkins
2025-09-01 19:23:44 -05:00
committed by GitHub
parent f7ed8b4cab
commit 198e53bd42
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ export default function JSMpegPlayer({
statsIntervalRef.current = setInterval(() => {
const currentTimestamp = Date.now();
const timeDiff = (currentTimestamp - lastTimestampRef.current) / 1000; // in seconds
const bitrate = (bytesReceivedRef.current * 8) / timeDiff / 1000; // in kbps
const bitrate = bytesReceivedRef.current / timeDiff / 1000; // in kBps
setStats?.({
streamType: "jsmpeg",