From 78f2f7cfd03cc571ce3c48fd4fb1ecbb2a80fc22 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 20 Oct 2015 09:55:00 +0100 Subject: [PATCH] Add in voip mute video/audio code. Needs dev js-sdk --- src/controllers/molecules/RoomHeader.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/controllers/molecules/RoomHeader.js b/src/controllers/molecules/RoomHeader.js index d3afce1e49..d16e3cbd42 100644 --- a/src/controllers/molecules/RoomHeader.js +++ b/src/controllers/molecules/RoomHeader.js @@ -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 + }); } };