Fix global vars

This commit is contained in:
redphx
2024-04-24 16:50:59 +07:00
parent 9446e39eb0
commit 9d0f4c380b
30 changed files with 87 additions and 69 deletions

View File

@@ -1,6 +1,7 @@
import { t } from "../translation";
import { BxEvent } from "../bx-event";
import { CE } from "../../utils/html";
import { States } from "../../utils/global";
enum StreamBadge {
PLAYTIME = 'playtime',
@@ -85,7 +86,7 @@ export class StreamBadges {
} catch(e) {}
}
const stats = await STREAM_WEBRTC.getStats();
const stats = await States.currentStream.peerConnection?.getStats()!;
let totalIn = 0;
let totalOut = 0;
stats.forEach(stat => {