Add in voip mute video/audio code. Needs dev js-sdk

pull/21833/head
Kegan Dougal 2015-10-20 09:55:00 +01:00
parent 6baf405a05
commit 78f2f7cfd0
1 changed files with 22 additions and 0 deletions

View File

@ -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
});
}
};