Merge commit 'd2a731e' into rav/roomview_works

This commit is contained in:
Richard van der Hoff 2016-02-23 13:02:26 +00:00
commit 6aaced04fa
6 changed files with 25 additions and 9 deletions

View file

@ -64,6 +64,7 @@ var cssAttrs = [
"borderColor", "borderColor",
"borderTopColor", "borderTopColor",
"borderBottomColor", "borderBottomColor",
"borderLeftColor",
]; ];
var svgAttrs = [ var svgAttrs = [

View file

@ -111,6 +111,10 @@ module.exports = React.createClass({
); );
} }
if (this.state.syncState === "ERROR") {
return null;
}
if (wantPlaceholder) { if (wantPlaceholder) {
return ( return (
<div className="mx_RoomStatusBar_placeholderIndicator">...</div> <div className="mx_RoomStatusBar_placeholderIndicator">...</div>

View file

@ -947,10 +947,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) {
@ -993,6 +998,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
@ -1285,7 +1295,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

@ -94,7 +94,7 @@ module.exports = React.createClass({
_getThumbUrl: function() { _getThumbUrl: function() {
var content = this.props.mxEvent.getContent(); var content = this.props.mxEvent.getContent();
return MatrixClientPeg.get().mxcUrlToHttp(content.url, 480, 360); return MatrixClientPeg.get().mxcUrlToHttp(content.url, 800, 600);
}, },
render: function() { render: function() {
@ -103,10 +103,10 @@ module.exports = React.createClass({
var cli = MatrixClientPeg.get(); var cli = MatrixClientPeg.get();
var thumbHeight = null; var thumbHeight = null;
if (content.info) thumbHeight = this.thumbHeight(content.info.w, content.info.h, 480, 360); if (content.info) thumbHeight = this.thumbHeight(content.info.w, content.info.h, 800, 600);
var imgStyle = {}; var imgStyle = {};
if (thumbHeight) imgStyle['height'] = thumbHeight; if (thumbHeight) imgStyle['maxHeight'] = thumbHeight;
var thumbUrl = this._getThumbUrl(); var thumbUrl = this._getThumbUrl();
if (thumbUrl) { if (thumbUrl) {

View file

@ -85,9 +85,9 @@ module.exports = React.createClass({
// if this call is a conf call, don't display local video as the // if this call is a conf call, don't display local video as the
// conference will have us in it // conference will have us in it
this.getVideoView().getLocalVideoElement().style.display = ( this.getVideoView().getLocalVideoElement().style.display = (
call.confUserId ? "none" : "initial" call.confUserId ? "none" : "block"
); );
this.getVideoView().getRemoteVideoElement().style.display = "initial"; this.getVideoView().getRemoteVideoElement().style.display = "block";
} }
else { else {
this.getVideoView().getLocalVideoElement().style.display = "none"; this.getVideoView().getLocalVideoElement().style.display = "none";

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 = (