Play the blocked sound on time limit
Play the 'blocked' sound effect whenever the user is till holding the button but can't speak anymore, whether they've been cut off by someone else or have reached their time limit.
This commit is contained in:
		
					parent
					
						
							
								9fbe4278c2
							
						
					
				
			
			
				commit
				
					
						603dd3786a
					
				
			
		
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -73,9 +73,9 @@ export const usePTT = (
 | 
			
		|||
          playClip(PTTClipID.START_TALKING_REMOTE);
 | 
			
		||||
        }
 | 
			
		||||
      } else if (
 | 
			
		||||
        activeSpeakerFeed &&
 | 
			
		||||
        pttButtonHeld &&
 | 
			
		||||
        activeSpeakerUserId === client.getUserId() &&
 | 
			
		||||
        activeSpeakerFeed.userId !== client.getUserId()
 | 
			
		||||
        activeSpeakerFeed?.userId !== client.getUserId()
 | 
			
		||||
      ) {
 | 
			
		||||
        // We were talking but we've been cut off
 | 
			
		||||
        playClip(PTTClipID.BLOCKED);
 | 
			
		||||
| 
						 | 
				
			
			@ -108,7 +108,7 @@ export const usePTT = (
 | 
			
		|||
        );
 | 
			
		||||
      }
 | 
			
		||||
    };
 | 
			
		||||
  }, [userMediaFeeds, activeSpeakerUserId, client, playClip]);
 | 
			
		||||
  }, [userMediaFeeds, activeSpeakerUserId, client, playClip, pttButtonHeld]);
 | 
			
		||||
 | 
			
		||||
  const startTalking = useCallback(async () => {
 | 
			
		||||
    if (pttButtonHeld) return;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue