Add a way to maximize/pin widget from the PiP view (#7672)

This commit is contained in:
Šimon Brandner 2022-05-05 10:57:10 +02:00 committed by GitHub
parent 1a0af54ccb
commit c79596cfe6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 112 additions and 46 deletions

View file

@ -270,6 +270,13 @@ export default class CallView extends React.Component<IProps, IState> {
return { primary, sidebar };
}
private onMaximizeClick = (): void => {
dis.dispatch({
action: 'video_fullscreen',
fullscreen: true,
});
};
private onMicMuteClick = async (): Promise<void> => {
const newVal = !this.state.micMuted;
this.setState({ micMuted: await this.props.call.setMicrophoneMuted(newVal) });
@ -614,6 +621,7 @@ export default class CallView extends React.Component<IProps, IState> {
onPipMouseDown={onMouseDownOnHeader}
pipMode={pipMode}
callRooms={[callRoom, secCallRoom]}
onMaximize={this.onMaximizeClick}
/>
<div className="mx_CallView_content_wrapper" ref={this.contentWrapperRef}>
{ this.renderToast() }