Work around mute state updates being slow

Since the app already determines when someone is speaking, we can use that information to make it less obvious when to-device messages are being slow to deliver mute state updates.
This commit is contained in:
Robin Townsend 2023-01-09 11:10:59 -05:00
parent d123793deb
commit 4fd76f9599

View File

@ -137,7 +137,13 @@ export const VideoTile = forwardRef<HTMLDivElement, Props>(
</div> </div>
) : ( ) : (
<div className={classNames(styles.infoBubble, styles.memberName)}> <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 />} {videoMuted && <VideoMutedIcon />}
<span title={caption}>{caption}</span> <span title={caption}>{caption}</span>
</div> </div>