mirror of https://github.com/vector-im/riot-web
Correct sidebar behaviour when muting local video
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
c7a28491ca
commit
cfaf4b8078
|
@ -644,7 +644,6 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
<CallViewSidebar
|
<CallViewSidebar
|
||||||
feeds={this.state.secondaryFeeds}
|
feeds={this.state.secondaryFeeds}
|
||||||
call={this.props.call}
|
call={this.props.call}
|
||||||
hideFeedsWithMutedVideo={!this.state.primaryFeed || this.state.primaryFeed?.isVideoMuted()}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,17 +18,22 @@ 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>;
|
||||||
call: MatrixCall;
|
call: MatrixCall;
|
||||||
hideFeedsWithMutedVideo: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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) => {
|
||||||
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 (
|
return (
|
||||||
<VideoFeed
|
<VideoFeed
|
||||||
|
|
Loading…
Reference in New Issue