mirror of https://github.com/vector-im/riot-web
Add in voip mute video/audio code. Needs dev js-sdk
parent
6baf405a05
commit
78f2f7cfd0
|
@ -92,5 +92,27 @@ module.exports = {
|
|||
// (e.g. conferences which will hangup the 1:1 room instead)
|
||||
room_id: call.roomId
|
||||
});
|
||||
},
|
||||
onMuteAudioClick: function() {
|
||||
var call = CallHandler.getCallForRoom(this.props.room.roomId);
|
||||
if (!call) {
|
||||
return;
|
||||
}
|
||||
var newState = !call.isMicrophoneMuted();
|
||||
call.setMicrophoneMuted(newState);
|
||||
this.setState({
|
||||
audioMuted: newState
|
||||
});
|
||||
},
|
||||
onMuteVideoClick: function() {
|
||||
var call = CallHandler.getCallForRoom(this.props.room.roomId);
|
||||
if (!call) {
|
||||
return;
|
||||
}
|
||||
var newState = !call.isLocalVideoMuted();
|
||||
call.setLocalVideoMuted(newState);
|
||||
this.setState({
|
||||
videoMuted: newState
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue