Skip to content
Snippets Groups Projects
Commit 78f2f7cf authored by Kegan Dougal's avatar Kegan Dougal
Browse files

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

parent 6baf405a
No related branches found
No related tags found
No related merge requests found
......@@ -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
});
}
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment