mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 12:14:12 +00:00 
			
		
		
		
	Release user media
This commit is contained in:
		@@ -330,6 +330,11 @@ class CallWindow extends CustomEvents {
 | 
			
		||||
			delete this.mainPeer;
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		// Release user media
 | 
			
		||||
		if(this.mainStream) {
 | 
			
		||||
			this.mainStream.getTracks().forEach(e => e.stop())
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Destroy peer connections
 | 
			
		||||
		for(const el of this.peersEls)
 | 
			
		||||
			el[1].destroy()
 | 
			
		||||
@@ -501,6 +506,7 @@ class CallWindow extends CustomEvents {
 | 
			
		||||
		videoEl.play()
 | 
			
		||||
 | 
			
		||||
		this.videoEls.set(peerID, videoEl)
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user