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
No known key found for this signature in database
GPG key ID: 9760693FDD98A790

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 {