Adjust hiding local feeds

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-07-21 17:12:27 +02:00
parent 337664a1b4
commit 0a8067506f
No known key found for this signature in database
GPG key ID: 55C211A1226CB17D

View file

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