From 7e3e4cdd678dc4b0eb8074d8e7369c2e355a03bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5var=20Aamb=C3=B8=20Fosstveit?= Date: Tue, 5 Nov 2019 14:46:15 +0100 Subject: [PATCH] Fix muting microphone from hotkey. Didn't update UI before. --- app/src/RoomClient.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js index fb22753..7e2d4c5 100644 --- a/app/src/RoomClient.js +++ b/app/src/RoomClient.js @@ -266,28 +266,33 @@ export default class RoomClient { if (this._micProducer) { - if (this._micProducer.paused) + if (!this._micProducer.paused) { - this._micProducer.resume(); - - store.dispatch(requestActions.notify( - { - text : 'Unmuted your microphone.' - })); - } - else - { - this._micProducer.pause(); + this.muteMic(); store.dispatch(requestActions.notify( { text : 'Muted your microphone.' })); } + else + { + this.unmuteMic(); + + store.dispatch(requestActions.notify( + { + text : 'Unmuted your microphone.' + })); + } } else { this.enableMic(); + + store.dispatch(requestActions.notify( + { + text : 'Enabled your microphone.' + })); } break;