From b518b33169c491b637905c06ebb3d6f5671a1385 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 19 Nov 2020 17:33:43 +0000 Subject: [PATCH] Factor the height of the header into the max video height --- src/components/views/voip/CallView.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index c534a87d47..3a5dfcf068 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -86,6 +86,9 @@ 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; export default class CallView extends React.Component { private dispatcherRef: string; @@ -361,7 +364,7 @@ export default class CallView extends React.Component { if (this.state.call.type === CallType.Video) { // if we're fullscreen, we don't want to set a maxHeight on the video element. - const maxVideoHeight = getFullScreenElement() ? null : this.props.maxVideoHeight; + const maxVideoHeight = getFullScreenElement() ? null : this.props.maxVideoHeight - HEADER_HEIGHT; contentView =