stats fixes

This commit is contained in:
Josh Hawkins 2024-12-30 09:09:30 -06:00
parent bfb2ea8583
commit d718b6621e
2 changed files with 2 additions and 2 deletions

View File

@ -581,7 +581,7 @@ function MSEPlayer({
useEffect(() => {
const video = videoRef.current;
let lastLoadedBytes = 0;
let lastLoadedBytes = totalBytesLoaded.current;
let lastTimestamp = Date.now();
if (!getStats) return;

View File

@ -298,7 +298,7 @@ export default function WebRtcPlayer({
};
// we need to listen on the value of the ref
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [pcRef, pcRef.current]);
}, [pcRef, pcRef.current, getStats]);
return (
<video