From 86cb7f99ce910e5f5e58ba872eedc37c43005eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 30 Dec 2020 08:46:54 +0100 Subject: [PATCH] Hide localVideoFeed if video is muted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/voip/CallView.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index 6748728278..260de4d68a 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -437,6 +437,7 @@ export default class CallView extends React.Component { } if (this.props.call.type === CallType.Video) { + let localVideoFeed = null; let onHoldContent = null; let onHoldBackground = null; const backgroundStyle: CSSProperties = {}; @@ -455,6 +456,9 @@ export default class CallView extends React.Component { backgroundStyle.backgroundImage = 'url(' + backgroundAvatarUrl + ')'; onHoldBackground =
; } + if (!this.state.vidMuted) { + localVideoFeed = ; + } // if we're fullscreen, we don't want to set a maxHeight on the video element. const maxVideoHeight = getFullScreenElement() ? null : ( @@ -470,7 +474,7 @@ export default class CallView extends React.Component { - + {localVideoFeed} {onHoldContent} {callControls}
;