mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 10:11:03 +01:00 
			
		
		
		
	Add in voip mute video/audio skin. Needs a bit more CSS tweaks.
This commit is contained in:
		
							parent
							
								
									bdbfc2b6e0
								
							
						
					
					
						commit
						d302f3eebb
					
				@ -128,3 +128,7 @@ limitations under the License.
 | 
				
			|||||||
.mx_MemberTile_zalgo {
 | 
					.mx_MemberTile_zalgo {
 | 
				
			||||||
    font-family: Helvetica, Arial, Sans-Serif;
 | 
					    font-family: Helvetica, Arial, Sans-Serif;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.mx_MemberTile:hover .mx_MessageTimestamp {
 | 
				
			||||||
 | 
					    display: block;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -163,3 +163,7 @@ limitations under the License.
 | 
				
			|||||||
.mx_RoomHeader_button img {
 | 
					.mx_RoomHeader_button img {
 | 
				
			||||||
    cursor: pointer;
 | 
					    cursor: pointer;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.mx_RoomHeader_voipButton {
 | 
				
			||||||
 | 
					    display: table-cell;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,7 @@ limitations under the License.
 | 
				
			|||||||
var React = require('react');
 | 
					var React = require('react');
 | 
				
			||||||
var sdk = require('matrix-react-sdk')
 | 
					var sdk = require('matrix-react-sdk')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var CallHandler = require('matrix-react-sdk/lib/CallHandler');
 | 
				
			||||||
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
 | 
					var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
 | 
				
			||||||
var RoomHeaderController = require('matrix-react-sdk/lib/controllers/molecules/RoomHeader')
 | 
					var RoomHeaderController = require('matrix-react-sdk/lib/controllers/molecules/RoomHeader')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -54,10 +55,37 @@ module.exports = React.createClass({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            var callButtons;
 | 
					            var callButtons;
 | 
				
			||||||
            if (this.state && this.state.call_state != 'ended') {
 | 
					            if (this.state && this.state.call_state != 'ended') {
 | 
				
			||||||
 | 
					                var muteVideoButton;
 | 
				
			||||||
 | 
					                var activeCall = (
 | 
				
			||||||
 | 
					                    CallHandler.getCallForRoom(this.props.room.roomId)
 | 
				
			||||||
 | 
					                );
 | 
				
			||||||
 | 
					                if (activeCall && activeCall.type === "video") {
 | 
				
			||||||
 | 
					                    muteVideoButton = (
 | 
				
			||||||
 | 
					                        <div className="mx_RoomHeader_textButton mx_RoomHeader_voipButton"
 | 
				
			||||||
 | 
					                                onClick={this.onMuteVideoClick}>
 | 
				
			||||||
 | 
					                            {
 | 
				
			||||||
 | 
					                                (activeCall.isLocalVideoMuted() ?
 | 
				
			||||||
 | 
					                                    "Unmute" : "Mute") + " video"
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    );
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                callButtons = (
 | 
					                callButtons = (
 | 
				
			||||||
                    <div className="mx_RoomHeader_textButton" onClick={this.onHangupClick}>
 | 
					                    <div>
 | 
				
			||||||
 | 
					                        <div className="mx_RoomHeader_textButton mx_RoomHeader_voipButton"
 | 
				
			||||||
 | 
					                                onClick={this.onHangupClick}>
 | 
				
			||||||
                            End call
 | 
					                            End call
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
 | 
					                        {muteVideoButton}
 | 
				
			||||||
 | 
					                        <div className="mx_RoomHeader_textButton mx_RoomHeader_voipButton"
 | 
				
			||||||
 | 
					                                onClick={this.onMuteAudioClick}>
 | 
				
			||||||
 | 
					                            {
 | 
				
			||||||
 | 
					                                (activeCall && activeCall.isMicrophoneMuted() ?
 | 
				
			||||||
 | 
					                                    "Unmute" : "Mute") + " audio"
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
                );
 | 
					                );
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user