add fullscreen button back

pull/21833/head
Matthew Hodgson 2015-12-15 00:01:47 +00:00
parent 39c628d4a1
commit a8d7810bfc
2 changed files with 17 additions and 8 deletions

View File

@ -998,6 +998,13 @@ module.exports = React.createClass({
} }
}, },
onFullscreenClick: function() {
dis.dispatch({
action: 'video_fullscreen',
fullscreen: true
}, true);
},
onMuteAudioClick: function() { onMuteAudioClick: function() {
var call = CallHandler.getCallForRoom(this.props.roomId); var call = CallHandler.getCallForRoom(this.props.roomId);
if (!call) { if (!call) {
@ -1204,17 +1211,22 @@ module.exports = React.createClass({
var inCall = false; var inCall = false;
if (call && this.state.callState != 'ended') { if (call && this.state.callState != 'ended') {
inCall = true; inCall = true;
//var muteVideoButton; var zoomButton, voiceMuteButton, videoMuteButton;
var voiceMuteButton, videoMuteButton;
if (call.type === "video") { if (call.type === "video") {
zoomButton = (
<div className="mx_RoomView_voipButton" onClick={this.onFullscreenClick}>
<img src="img/fullscreen.svg" title="Fill screen" alt="Fill screen" width="29" height="22" style={{ marginTop: 1, marginRight: 4 }}/>
</div>
);
videoMuteButton = videoMuteButton =
<div className="mx_RoomView_muteButton" onClick={this.onMuteVideoClick}> <div className="mx_RoomView_voipButton" onClick={this.onMuteVideoClick}>
<img src={call.isLocalVideoMuted() ? "img/video-unmute.svg" : "img/video-mute.svg"} width="31" height="27"/> <img src={call.isLocalVideoMuted() ? "img/video-unmute.svg" : "img/video-mute.svg"} width="31" height="27"/>
</div> </div>
} }
voiceMuteButton = voiceMuteButton =
<div className="mx_RoomView_muteButton" onClick={this.onMuteAudioClick}> <div className="mx_RoomView_voipButton" onClick={this.onMuteAudioClick}>
<img src={call.isMicrophoneMuted() ? "img/voice-unmute.svg" : "img/voice-mute.svg"} width="21" height="26"/> <img src={call.isMicrophoneMuted() ? "img/voice-unmute.svg" : "img/voice-mute.svg"} width="21" height="26"/>
</div> </div>
@ -1230,6 +1242,7 @@ module.exports = React.createClass({
<div className="mx_RoomView_callStatusBar"> <div className="mx_RoomView_callStatusBar">
{ voiceMuteButton } { voiceMuteButton }
{ videoMuteButton } { videoMuteButton }
{ zoomButton }
{ statusBar } { statusBar }
<img className="mx_RoomView_voipChevron" src="img/voip-chevron.svg" width="22" height="17"/> <img className="mx_RoomView_voipChevron" src="img/voip-chevron.svg" width="22" height="17"/>
</div> </div>

View File

@ -66,10 +66,6 @@ module.exports = React.createClass({
getRoomName: function() { getRoomName: function() {
return this.refs.name_edit.value; return this.refs.name_edit.value;
}, },
onFullscreenClick: function() {
dis.dispatch({action: 'video_fullscreen', fullscreen: true}, true);
},
render: function() { render: function() {
var EditableText = sdk.getComponent("elements.EditableText"); var EditableText = sdk.getComponent("elements.EditableText");