From 468e3893247d947ffabc1d96a79f8af501ada237 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Fri, 6 Jan 2023 10:26:10 -0500 Subject: [PATCH] Leave audio elements unmuted regardless of mute state --- src/video-grid/AudioSink.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/video-grid/AudioSink.tsx b/src/video-grid/AudioSink.tsx index 2cdc636..24019e4 100644 --- a/src/video-grid/AudioSink.tsx +++ b/src/video-grid/AudioSink.tsx @@ -31,14 +31,15 @@ export const AudioSink: React.FC = ({ tileDescriptor, audioOutput, }: Props) => { - const { audioMuted, localVolume, stream } = useCallFeed( - tileDescriptor.callFeed - ); + const { localVolume, stream } = useCallFeed(tileDescriptor.callFeed); const audioElementRef = useMediaStream( stream, audioOutput, - audioMuted, + // We don't compare the audioMuted flag of useCallFeed here, since unmuting + // depends on to-device messages which may lag behind the audio actually + // starting to flow over the stream + tileDescriptor.isLocal, localVolume );