Made webRTCHandler clean up it's mess a little better
This commit is contained in:
parent
631aa853f5
commit
b5bec9da50
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue