From d2a731e255d7450a8e5bb9f1b00314ea065e428f Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 19 Feb 2016 01:18:53 +0000 Subject: [PATCH] only resize the video element if not fullscreen --- src/components/structures/RoomView.js | 18 ++++++++++++++---- src/components/views/voip/VideoView.js | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 61e8710c0d..5ac8943b33 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -1368,9 +1368,14 @@ module.exports = React.createClass({ if (auxPanelMaxHeight < 50) auxPanelMaxHeight = 50; if (this.refs.callView) { - var video = this.refs.callView.getVideoView().getRemoteVideoElement(); - - video.style.maxHeight = auxPanelMaxHeight + "px"; + var fullscreenElement = + (document.fullscreenElement || + document.mozFullScreenElement || + document.webkitFullscreenElement); + if (!fullscreenElement) { + var video = this.refs.callView.getVideoView().getRemoteVideoElement(); + video.style.maxHeight = auxPanelMaxHeight + "px"; + } } // we need to do this for general auxPanels too @@ -1414,6 +1419,11 @@ module.exports = React.createClass({ }); }, + onCallViewResize: function() { + this.onChildResize(); + this.onResize(); + }, + onChildResize: function() { // When the video or the message composer resizes, the scroll panel // also changes size. Work around GeminiScrollBar fail by telling it @@ -1733,7 +1743,7 @@ module.exports = React.createClass({
{ fileDropTarget } + onResize={this.onCallViewResize} /> { conferenceCallNotification } { aux }
diff --git a/src/components/views/voip/VideoView.js b/src/components/views/voip/VideoView.js index 08e587f47f..6b4b546270 100644 --- a/src/components/views/voip/VideoView.js +++ b/src/components/views/voip/VideoView.js @@ -64,6 +64,7 @@ module.exports = React.createClass({ element.msRequestFullscreen ); requestMethod.call(element); + this.getRemoteVideoElement().style.maxHeight = "inherit"; } else { var exitMethod = (