From b5bec9da50c6a3d3d5d4a7e37e990b72ffbdf379 Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Wed, 7 Oct 2026 11:57:39 -0400 Subject: [PATCH] Made webRTCHandler clean up it's mess a little better --- www/js/channel/webRTCHandler.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/js/channel/webRTCHandler.js b/www/js/channel/webRTCHandler.js index 62a399a..ffce29d 100644 --- a/www/js/channel/webRTCHandler.js +++ b/www/js/channel/webRTCHandler.js @@ -258,6 +258,14 @@ class webRTCHandler{ this.isBroadcasting = false; this.answered = false; + //If we're still broadcasting shit + if(this.broadcastingStream != null){ + //For every track media track we're pushin' down tha wire + for(let track of this.broadcastingStream.getTracks()){ + track.stop(); + } + } + //clear peer/media stream objects this.currentStream = null; this.broadcastingStream = null;