Hide feeds with muted video in certain cases and fix colors

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-06-12 14:01:09 +02:00
parent 6ae1f533e9
commit 9a67851479
No known key found for this signature in database
GPG key ID: 9760693FDD98A790
3 changed files with 5 additions and 1 deletions
res/css/views/voip
src/components/views/voip

View file

@ -38,7 +38,7 @@ limitations under the License.
margin-bottom: 12px;
&.mx_VideoFeed_voice {
background-color: #17191c; // Same on both themes
background-color: $inverted-bg-color;
display: flex;
align-items: center;

View file

@ -614,6 +614,7 @@ export default class CallView extends React.Component<IProps, IState> {
<CallViewSidebar
feeds={this.state.secondaryFeeds}
call={this.props.call}
hideFeedsWithMutedVideo={!this.state.primaryFeed || this.state.primaryFeed?.isVideoMuted()}
/>
);
}

View file

@ -23,11 +23,14 @@ import VideoFeed from "./VideoFeed";
interface IProps {
feeds: Array<CallFeed>;
call: MatrixCall;
hideFeedsWithMutedVideo: boolean;
}
export default class CallViewSidebar extends React.Component<IProps> {
render() {
const feeds = this.props.feeds.map((feed) => {
if (feed.isVideoMuted() && this.props.hideFeedsWithMutedVideo) return;
return (
<VideoFeed
key={feed.stream.id}