diff --git a/renderer/components/ui/streamcomponent.tsx b/renderer/components/ui/streamcomponent.tsx index 3885914c..6b0657be 100644 --- a/renderer/components/ui/streamcomponent.tsx +++ b/renderer/components/ui/streamcomponent.tsx @@ -27,7 +27,7 @@ function StreamComponent({ function performance_now_seconds() { return performance.now() / 1000.0 } - + let lastMovement = 0 let gamebarElement = document.getElementById('component_streamcomponent_gamebar') let debugElement = document.getElementById('component_streamcomponent_debug') @@ -103,7 +103,7 @@ function StreamComponent({ }, ] }, jitterData, document.getElementById('component_streamcomponent_debug_webrtc_jitter')); - + const droppedUplot = new uPlot({ title: "Packets lost / Frames dropped", id: "component_streamcomponent_debug_webrtc_dropped", @@ -156,7 +156,7 @@ function StreamComponent({ webRtcStatsInterval = setInterval(() => { xPlayer._webrtcClient.getStats().then((stats) => { let statsOutput = ""; - + stats.forEach((report) => { if (report.type === "inbound-rtp" && report.kind === "video") { @@ -190,7 +190,7 @@ function StreamComponent({ } } }); - + // document.querySelector('div#component_streamcomponent_debug_text').innerHTML = statsOutput; }); }, 33); @@ -228,7 +228,7 @@ function StreamComponent({ } } window.addEventListener('keypress', keyboardPressEvent) - + // cleanup this component return () => { window.removeEventListener('mousemove', mouseEvent) @@ -266,7 +266,6 @@ function StreamComponent({ if(confirm('Are you sure you want to end your stream?')){ document.getElementById('streamComponentHolder').innerHTML = ''; onDisconnect() - xPlayer.close() } } @@ -286,17 +285,18 @@ function StreamComponent({ function drawWaitingTimes(seconds){ if(seconds !== false){ setWaitingSeconds(seconds) - const html = '