mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 17:12:16 +03:00
Fix stream stats display (#19874)
* Fix stats calculations and labels * fix linter from complaining * fix mse calc * label
This commit is contained in:
@@ -338,7 +338,7 @@ function MSEPlayer({
|
||||
// console.debug("VideoRTC.buffer", b.byteLength, bufLen);
|
||||
} else {
|
||||
try {
|
||||
sb?.appendBuffer(data);
|
||||
sb?.appendBuffer(data as ArrayBuffer);
|
||||
} catch (e) {
|
||||
// no-op
|
||||
}
|
||||
@@ -592,7 +592,7 @@ function MSEPlayer({
|
||||
const now = Date.now();
|
||||
const bytesLoaded = totalBytesLoaded.current;
|
||||
const timeElapsed = (now - lastTimestamp) / 1000; // seconds
|
||||
const bandwidth = (bytesLoaded - lastLoadedBytes) / timeElapsed / 1024; // kbps
|
||||
const bandwidth = (bytesLoaded - lastLoadedBytes) / timeElapsed / 1000; // kBps
|
||||
|
||||
lastLoadedBytes = bytesLoaded;
|
||||
lastTimestamp = now;
|
||||
|
||||
Reference in New Issue
Block a user