Merge pull request #6547 from SimonBrandner/feature/call-upgrades
Update muting in calls to work with the js-sdk call upgrade changespull/21833/head
commit
3a548d4c9c
|
@ -214,6 +214,8 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
this.setState({
|
this.setState({
|
||||||
primaryFeed: primary,
|
primaryFeed: primary,
|
||||||
secondaryFeeds: secondary,
|
secondaryFeeds: secondary,
|
||||||
|
micMuted: this.props.call.isMicrophoneMuted(),
|
||||||
|
vidMuted: this.props.call.isLocalVideoMuted(),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -258,18 +260,14 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
return { primary, secondary };
|
return { primary, secondary };
|
||||||
}
|
}
|
||||||
|
|
||||||
private onMicMuteClick = (): void => {
|
private onMicMuteClick = async (): Promise<void> => {
|
||||||
const newVal = !this.state.micMuted;
|
const newVal = !this.state.micMuted;
|
||||||
|
this.setState({ micMuted: await this.props.call.setMicrophoneMuted(newVal) });
|
||||||
this.props.call.setMicrophoneMuted(newVal);
|
|
||||||
this.setState({ micMuted: newVal });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private onVidMuteClick = (): void => {
|
private onVidMuteClick = async (): Promise<void> => {
|
||||||
const newVal = !this.state.vidMuted;
|
const newVal = !this.state.vidMuted;
|
||||||
|
this.setState({ vidMuted: await this.props.call.setLocalVideoMuted(newVal) });
|
||||||
this.props.call.setLocalVideoMuted(newVal);
|
|
||||||
this.setState({ vidMuted: newVal });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private onScreenshareClick = async (): Promise<void> => {
|
private onScreenshareClick = async (): Promise<void> => {
|
||||||
|
|
Loading…
Reference in New Issue