only resize the video element if not fullscreen

This commit is contained in:
Matthew Hodgson 2016-02-19 01:18:53 +00:00
parent 7f310ce307
commit d2a731e255
2 changed files with 15 additions and 4 deletions

View file

@ -1368,10 +1368,15 @@ module.exports = React.createClass({
if (auxPanelMaxHeight < 50) auxPanelMaxHeight = 50; if (auxPanelMaxHeight < 50) auxPanelMaxHeight = 50;
if (this.refs.callView) { if (this.refs.callView) {
var fullscreenElement =
(document.fullscreenElement ||
document.mozFullScreenElement ||
document.webkitFullscreenElement);
if (!fullscreenElement) {
var video = this.refs.callView.getVideoView().getRemoteVideoElement(); var video = this.refs.callView.getVideoView().getRemoteVideoElement();
video.style.maxHeight = auxPanelMaxHeight + "px"; video.style.maxHeight = auxPanelMaxHeight + "px";
} }
}
// we need to do this for general auxPanels too // we need to do this for general auxPanels too
if (this.refs.auxPanel) { if (this.refs.auxPanel) {
@ -1414,6 +1419,11 @@ module.exports = React.createClass({
}); });
}, },
onCallViewResize: function() {
this.onChildResize();
this.onResize();
},
onChildResize: function() { onChildResize: function() {
// When the video or the message composer resizes, the scroll panel // When the video or the message composer resizes, the scroll panel
// also changes size. Work around GeminiScrollBar fail by telling it // also changes size. Work around GeminiScrollBar fail by telling it
@ -1733,7 +1743,7 @@ module.exports = React.createClass({
<div className="mx_RoomView_auxPanel" ref="auxPanel"> <div className="mx_RoomView_auxPanel" ref="auxPanel">
{ fileDropTarget } { fileDropTarget }
<CallView ref="callView" room={this.state.room} ConferenceHandler={this.props.ConferenceHandler} <CallView ref="callView" room={this.state.room} ConferenceHandler={this.props.ConferenceHandler}
onResize={this.onChildResize} /> onResize={this.onCallViewResize} />
{ conferenceCallNotification } { conferenceCallNotification }
{ aux } { aux }
</div> </div>

View file

@ -64,6 +64,7 @@ module.exports = React.createClass({
element.msRequestFullscreen element.msRequestFullscreen
); );
requestMethod.call(element); requestMethod.call(element);
this.getRemoteVideoElement().style.maxHeight = "inherit";
} }
else { else {
var exitMethod = ( var exitMethod = (