mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Can stop streaming
This commit is contained in:
		@@ -212,6 +212,15 @@ class CallWindow extends CustomEvents {
 | 
				
			|||||||
					}
 | 
										}
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									// Stop streaming
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										icon: "fa-stop",
 | 
				
			||||||
 | 
										text: "Stop streaming",
 | 
				
			||||||
 | 
										onclick: () => {
 | 
				
			||||||
 | 
											this.closeMainPeer()
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			]
 | 
								]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			//Add buttons
 | 
								//Add buttons
 | 
				
			||||||
@@ -511,8 +520,10 @@ class CallWindow extends CustomEvents {
 | 
				
			|||||||
		const el = this.videoEls.get(peerID);
 | 
							const el = this.videoEls.get(peerID);
 | 
				
			||||||
		this.videoEls.delete(peerID)
 | 
							this.videoEls.delete(peerID)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		el.pause()
 | 
							if(el) {
 | 
				
			||||||
		el.parentNode.remove()
 | 
								el.pause()
 | 
				
			||||||
 | 
								el.parentNode.remove()	
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
@@ -818,6 +829,9 @@ class CallWindow extends CustomEvents {
 | 
				
			|||||||
			this.mainStream.getTracks().forEach(e => e.stop())
 | 
								this.mainStream.getTracks().forEach(e => e.stop())
 | 
				
			||||||
			delete this.mainStream
 | 
								delete this.mainStream
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							this.removeVideoElement(userID())
 | 
				
			||||||
 | 
							this.refreshButtonsState()
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user