Skip to content

Commit 78f2f7c

Browse files
committed
Add in voip mute video/audio code. Needs dev js-sdk
1 parent 6baf405 commit 78f2f7c

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

‎src/controllers/molecules/RoomHeader.js‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,27 @@ module.exports = {
9292
// (e.g. conferences which will hangup the 1:1 room instead)
9393
room_id: call.roomId
9494
});
95+
},
96+
onMuteAudioClick: function() {
97+
var call = CallHandler.getCallForRoom(this.props.room.roomId);
98+
if (!call) {
99+
return;
100+
}
101+
var newState = !call.isMicrophoneMuted();
102+
call.setMicrophoneMuted(newState);
103+
this.setState({
104+
audioMuted: newState
105+
});
106+
},
107+
onMuteVideoClick: function() {
108+
var call = CallHandler.getCallForRoom(this.props.room.roomId);
109+
if (!call) {
110+
return;
111+
}
112+
var newState = !call.isLocalVideoMuted();
113+
call.setLocalVideoMuted(newState);
114+
this.setState({
115+
videoMuted: newState
116+
});
95117
}
96118
};

0 commit comments

Comments
 (0)