1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

Also turn off camera when hiding sidebar

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-06-12 18:13:28 +02:00
parent 60ab7aaed5
commit a933e08e5f

View File

@@ -431,7 +431,15 @@ export default class CallView extends React.Component<IProps, IState> {
} }
private onToggleSidebar = () => { private onToggleSidebar = () => {
this.setState({ sidebarShown: !this.state.sidebarShown }); let vidMuted = this.state.vidMuted;
if (this.state.screensharing) {
vidMuted = this.state.sidebarShown;
this.props.call.setLocalVideoMuted(vidMuted);
}
this.setState({
vidMuted: vidMuted,
sidebarShown: !this.state.sidebarShown,
});
} }
private renderCallControls(): JSX.Element { private renderCallControls(): JSX.Element {