Update sidebar behaviour

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-07-21 16:34:21 +02:00
parent 74649f1f92
commit 337664a1b4
No known key found for this signature in database
GPG key ID: 55C211A1226CB17D
2 changed files with 15 additions and 6 deletions

View file

@ -23,16 +23,19 @@ import { SDPStreamMetadataPurpose } from "matrix-js-sdk/src/webrtc/callEventType
interface IProps {
feeds: Array<CallFeed>;
call: MatrixCall;
hideLocalFeeds: boolean;
}
export default class CallViewSidebar extends React.Component<IProps> {
render() {
const feeds = this.props.feeds.map((feed) => {
// Hide local video feed if video is off
// Hide local usermedia feed if video is muted or hide any local feed if we should do so
if (
this.props.call.isLocalVideoMuted()
&& feed.isLocal()
&& feed.purpose === SDPStreamMetadataPurpose.Usermedia
feed.isLocal() &&
(
(this.props.call.isLocalVideoMuted() && feed.purpose === SDPStreamMetadataPurpose.Usermedia) ||
this.props.hideLocalFeeds
)
) return;
return (