mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-03 19:54:14 +00:00 
			
		
		
		
	Add current user to the list of connected peers
This commit is contained in:
		@@ -372,8 +372,7 @@ class CallWindow extends CustomEvents {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			// Apply this list of user
 | 
								// Apply this list of user
 | 
				
			||||||
			for(const user of currMembersList)
 | 
								for(const user of currMembersList)
 | 
				
			||||||
				if(user.userID != userID())
 | 
									await this.AddMember(user.userID)
 | 
				
			||||||
					await this.AddMember(user.userID)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
			// Start to connect to ready pears
 | 
								// Start to connect to ready pears
 | 
				
			||||||
			for(const user of currMembersList)
 | 
								for(const user of currMembersList)
 | 
				
			||||||
@@ -867,6 +866,9 @@ class CallWindow extends CustomEvents {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		this.mainPeer.on("connect", () =>  {
 | 
							this.mainPeer.on("connect", () =>  {
 | 
				
			||||||
			console.info("Connected to remote peer!")
 | 
								console.info("Connected to remote peer!")
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								this.getMemberNameEl(userID()).classList.add("ready");
 | 
				
			||||||
 | 
								
 | 
				
			||||||
			setTimeout(() => {
 | 
								setTimeout(() => {
 | 
				
			||||||
				// Add a little delay before notifying other peers in order to let the tracks be received by the proxy
 | 
									// Add a little delay before notifying other peers in order to let the tracks be received by the proxy
 | 
				
			||||||
				if(this.mainPeer && !this.mainPeer.destroyed)
 | 
									if(this.mainPeer && !this.mainPeer.destroyed)
 | 
				
			||||||
@@ -903,6 +905,8 @@ class CallWindow extends CustomEvents {
 | 
				
			|||||||
	 */
 | 
						 */
 | 
				
			||||||
	async closeMainPeer() {
 | 
						async closeMainPeer() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// Remove ready attribute
 | 
				
			||||||
 | 
							this.getMemberNameEl(userID()).classList.remove("ready");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Close peer connection
 | 
							// Close peer connection
 | 
				
			||||||
		if(this.mainPeer) {
 | 
							if(this.mainPeer) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user