From 4fd76f95995665474499e6e4087607c70c5c27cf Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Mon, 9 Jan 2023 11:10:59 -0500 Subject: [PATCH] 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. --- src/video-grid/VideoTile.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/video-grid/VideoTile.tsx b/src/video-grid/VideoTile.tsx index 8695a7c..6ed1dd4 100644 --- a/src/video-grid/VideoTile.tsx +++ b/src/video-grid/VideoTile.tsx @@ -137,7 +137,13 @@ export const VideoTile = forwardRef( ) : (
- {audioMuted && !videoMuted && } + { + /* 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 && + } {videoMuted && } {caption}