Made webRTCHandler clean up it's mess a little better

This commit is contained in:
rainbow napkin 2026-10-07 11:57:39 -04:00
parent 631aa853f5
commit b5bec9da50

View file

@ -258,6 +258,14 @@ class webRTCHandler{
this.isBroadcasting = false; this.isBroadcasting = false;
this.answered = 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 //clear peer/media stream objects
this.currentStream = null; this.currentStream = null;
this.broadcastingStream = null; this.broadcastingStream = null;