From 4e9d19d3b0690d324e62e379e6e8f90475b55f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 2 Mar 2021 14:09:11 +0100 Subject: [PATCH 01/12] Pass resizeNotifier into CallViewForARoom MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/rooms/AuxPanel.tsx | 1 + src/components/views/voip/CallViewForRoom.tsx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/components/views/rooms/AuxPanel.tsx b/src/components/views/rooms/AuxPanel.tsx index 4ce31be410..21f8369db8 100644 --- a/src/components/views/rooms/AuxPanel.tsx +++ b/src/components/views/rooms/AuxPanel.tsx @@ -169,6 +169,7 @@ export default class AuxPanel extends React.Component { roomId={this.props.room.roomId} onResize={this.props.onResize} maxVideoHeight={this.props.maxHeight} + resizeNotifier={this.props.resizeNotifier} /> ); diff --git a/src/components/views/voip/CallViewForRoom.tsx b/src/components/views/voip/CallViewForRoom.tsx index 4cb4e66fbe..7085cda21a 100644 --- a/src/components/views/voip/CallViewForRoom.tsx +++ b/src/components/views/voip/CallViewForRoom.tsx @@ -19,6 +19,7 @@ import React from 'react'; import CallHandler from '../../../CallHandler'; import CallView from './CallView'; import dis from '../../../dispatcher/dispatcher'; +import ResizeNotifier from "../../../utils/ResizeNotifier"; interface IProps { // What room we should display the call for @@ -30,6 +31,8 @@ interface IProps { // a callback which is called when the content in the callview changes // in a way that is likely to cause a resize. onResize?: any; + + resizeNotifier: ResizeNotifier, } interface IState { From 69cdbef3d6e07f690a15626523fdaae1ad551a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 2 Mar 2021 20:31:39 +0100 Subject: [PATCH 02/12] Remove maxHeight prop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/voip/CallView.tsx | 18 ++---------------- src/components/views/voip/VideoFeed.tsx | 8 +------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index 7cac682794..6e7a9a635d 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -39,9 +39,6 @@ interface IProps { // Another ongoing call to display information about secondaryCall?: MatrixCall, - // maxHeight style attribute for the video panel - maxVideoHeight?: number; - // a callback which is called when the content in the callview changes // in a way that is likely to cause a resize. onResize?: any; @@ -517,20 +514,9 @@ export default class CallView extends React.Component { localVideoFeed = ; } - // if we're fullscreen, we don't want to set a maxHeight on the video element. - const maxVideoHeight = getFullScreenElement() || !this.props.maxVideoHeight ? null : ( - this.props.maxVideoHeight - (HEADER_HEIGHT + BOTTOM_PADDING + BOTTOM_MARGIN_TOP_BOTTOM) - ); - contentView =
+ contentView =
{onHoldBackground} - + {localVideoFeed} {onHoldContent} {callControls} diff --git a/src/components/views/voip/VideoFeed.tsx b/src/components/views/voip/VideoFeed.tsx index 5210f28eb1..1e950f3a2a 100644 --- a/src/components/views/voip/VideoFeed.tsx +++ b/src/components/views/voip/VideoFeed.tsx @@ -29,9 +29,6 @@ interface IProps { type: VideoFeedType, - // maxHeight style attribute for the video element - maxHeight?: number, - // a callback which is called when the video element is resized // due to a change in video metadata onResize?: (e: Event) => void, @@ -80,9 +77,6 @@ export default class VideoFeed extends React.Component { ), }; - let videoStyle = {}; - if (this.props.maxHeight) videoStyle = { maxHeight: this.props.maxHeight }; - - return
From 0e5297fcb008147cd0c80e7b5fcf9bb1b95dc0a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 3 Mar 2021 16:44:43 +0100 Subject: [PATCH 08/12] Fix local feed size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/views/voip/_VideoFeed.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/css/views/voip/_VideoFeed.scss b/res/css/views/voip/_VideoFeed.scss index ed5bb86420..8ead8bba3e 100644 --- a/res/css/views/voip/_VideoFeed.scss +++ b/res/css/views/voip/_VideoFeed.scss @@ -22,7 +22,8 @@ limitations under the License. } .mx_VideoFeed_local { - width: 20%; + width: 25%; + height: 25%; position: absolute; right: 10px; top: 10px; From c638ced21e53c3334d9f7d0b7919e6f8133818c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 3 Mar 2021 16:59:39 +0100 Subject: [PATCH 09/12] Remove unused consts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/voip/CallView.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index 6e7a9a635d..b4dad3b19a 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -92,9 +92,6 @@ function exitFullscreen() { const CONTROLS_HIDE_DELAY = 1000; // Height of the header duplicated from CSS because we need to subtract it from our max // height to get the max height of the video -const HEADER_HEIGHT = 44; -const BOTTOM_PADDING = 10; -const BOTTOM_MARGIN_TOP_BOTTOM = 10; // top margin plus bottom margin const CONTEXT_MENU_VPADDING = 8; // How far the context menu sits above the button (px) export default class CallView extends React.Component { From 35a5442e0d21b87df9d245e05f28d89f9950ebb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sun, 7 Mar 2021 15:05:13 +0100 Subject: [PATCH 10/12] Increase minHeight MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is needed for on hold. Otherwise it feels like too much, tbc Signed-off-by: Šimon Brandner --- src/components/views/voip/CallViewForRoom.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/voip/CallViewForRoom.tsx b/src/components/views/voip/CallViewForRoom.tsx index 054a831bf0..13088893ce 100644 --- a/src/components/views/voip/CallViewForRoom.tsx +++ b/src/components/views/voip/CallViewForRoom.tsx @@ -97,7 +97,7 @@ export default class CallViewForRoom extends React.Component { return (
Date: Mon, 22 Mar 2021 07:40:36 +0100 Subject: [PATCH 11/12] Make functions private MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/voip/CallViewForRoom.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/voip/CallViewForRoom.tsx b/src/components/views/voip/CallViewForRoom.tsx index 3e225ccd95..0ef5e5b350 100644 --- a/src/components/views/voip/CallViewForRoom.tsx +++ b/src/components/views/voip/CallViewForRoom.tsx @@ -79,15 +79,15 @@ export default class CallViewForRoom extends React.Component { return call; } - onResizeStart = () => { + private onResizeStart = () => { this.props.resizeNotifier.startResizing(); } - onResize = () => { + private onResize = () => { this.props.resizeNotifier.notifyTimelineHeightChanged(); } - onResizeStop = () => { + private onResizeStop = () => { this.props.resizeNotifier.stopResizing(); } From 9a2036c212a7a3bc980315618e7a764a4afdab64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Mon, 22 Mar 2021 07:44:37 +0100 Subject: [PATCH 12/12] Add semicolons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/voip/CallViewForRoom.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/voip/CallViewForRoom.tsx b/src/components/views/voip/CallViewForRoom.tsx index 0ef5e5b350..878b6af20f 100644 --- a/src/components/views/voip/CallViewForRoom.tsx +++ b/src/components/views/voip/CallViewForRoom.tsx @@ -81,15 +81,15 @@ export default class CallViewForRoom extends React.Component { private onResizeStart = () => { this.props.resizeNotifier.startResizing(); - } + }; private onResize = () => { this.props.resizeNotifier.notifyTimelineHeightChanged(); - } + }; private onResizeStop = () => { this.props.resizeNotifier.stopResizing(); - } + }; public render() { if (!this.state.call) return null;