From cfaf4b80789643952d1d61241ecb6a42c1f34c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 20 Jul 2021 17:08:17 +0200 Subject: [PATCH] Correct sidebar behaviour when muting local video 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 | 1 - src/components/views/voip/CallViewSidebar.tsx | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index 32a5ff0a85..3667173325 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -644,7 +644,6 @@ export default class CallView extends React.Component { ); } diff --git a/src/components/views/voip/CallViewSidebar.tsx b/src/components/views/voip/CallViewSidebar.tsx index d21fda7640..a8c6eed5a2 100644 --- a/src/components/views/voip/CallViewSidebar.tsx +++ b/src/components/views/voip/CallViewSidebar.tsx @@ -18,17 +18,22 @@ import React from "react"; import { MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import { CallFeed } from "matrix-js-sdk/src/webrtc/callFeed"; import VideoFeed from "./VideoFeed"; +import { SDPStreamMetadataPurpose } from "matrix-js-sdk/src/webrtc/callEventTypes"; interface IProps { feeds: Array; call: MatrixCall; - hideFeedsWithMutedVideo: boolean; } export default class CallViewSidebar extends React.Component { render() { const feeds = this.props.feeds.map((feed) => { - if (feed.isVideoMuted() && this.props.hideFeedsWithMutedVideo) return; + // Hide local video feed if video is off + if ( + this.props.call.isLocalVideoMuted() + && feed.isLocal() + && feed.purpose === SDPStreamMetadataPurpose.Usermedia + ) return; return (