Merge pull request #835 from robintown/unmuted-when-speaking

Work around mute state updates being slow
This commit is contained in:
Robin 2023-01-09 13:35:05 -05:00 committed by GitHub
commit 4e0f4a8dc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,7 +141,13 @@ export const VideoTile = forwardRef<HTMLDivElement, Props>(
</div>
) : (
<div className={classNames(styles.infoBubble, styles.memberName)}>
{audioMuted && !videoMuted && <MicMutedIcon />}
{
/* If the user is speaking, it's safe to say they're unmuted.
Mute state is currently sent over to-device messages, which
aren't quite real-time, so this is an important kludge to make
sure no one appears muted when they've clearly begun talking. */
audioMuted && !videoMuted && !speaking && <MicMutedIcon />
}
{videoMuted && <VideoMutedIcon />}
<span title={caption}>{caption}</span>
</div>