Filter inactive participants from the dev tools
This commit is contained in:
		
					parent
					
						
							
								e98abaff4d
							
						
					
				
			
			
				commit
				
					
						c2d7156033
					
				
			
		
					 2 changed files with 15 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -167,9 +167,17 @@ export class ConferenceCallManager extends EventEmitter {
 | 
			
		|||
      this.client.sendStateEvent(this.roomId, CONF_ROOM, { active: true }, "");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    this.room
 | 
			
		||||
      .getMembers()
 | 
			
		||||
      .forEach((member) => this._processMember(member.userId));
 | 
			
		||||
    const roomMemberIds = this.room.getMembers().map(({ userId }) => userId);
 | 
			
		||||
 | 
			
		||||
    for (const userId of this.debugState.keys()) {
 | 
			
		||||
      if (roomMemberIds.indexOf(userId) === -1) {
 | 
			
		||||
        this.debugState.delete(userId);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    roomMemberIds.forEach((userId) => {
 | 
			
		||||
      this._processMember(userId);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    for (const { call, onHangup, onReplaced } of this.pendingCalls) {
 | 
			
		||||
      if (call.roomId !== roomId) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,6 +41,10 @@ export function DevTools({ manager }) {
 | 
			
		|||
    };
 | 
			
		||||
  }, [manager]);
 | 
			
		||||
 | 
			
		||||
  if (!manager.joined) {
 | 
			
		||||
    return <div className={styles.devTools} />;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <div className={styles.devTools}>
 | 
			
		||||
      {Array.from(debugState.entries()).map(([userId, props]) => (
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue