fix(keyboardshortcut) spacebar release mutes participant (#9434)

* fix(keyboardshortcut) spacebar release mutes participant

* fix(keyboardshortcut) removed extra check
This commit is contained in:
Calinteodor 2021-06-23 11:53:23 +03:00 committed by GitHub
parent 487da8f231
commit 2a9b3dc1b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 8 deletions

View File

@ -62,7 +62,6 @@ const _focusedElementsSelector = `:focus:is(${_elementsBlacklist.join(',')})`;
* Maps keycode to character, id of popover for given function and function.
*/
const KeyboardShortcut = {
isPushToTalkActive: false,
init() {
this._initGlobalShortcuts();
@ -97,7 +96,6 @@ const KeyboardShortcut = {
PRESSED));
logger.log('Talk shortcut pressed');
APP.conference.muteAudio(false);
this.isPushToTalkActive = true;
}
}
} else if (this._getKeyboardKey(e).toUpperCase() === 'ESCAPE') {
@ -232,12 +230,9 @@ const KeyboardShortcut = {
// register SPACE shortcut in two steps to insure visibility of help
// message
this.registerShortcut(' ', null, () => {
if (this.isPushToTalkActive) {
sendAnalytics(createShortcutEvent('push.to.talk', RELEASED));
logger.log('Talk shortcut released');
APP.conference.muteAudio(true);
this.isPushToTalkActive = false;
}
});
this._addShortcutToHelp('SPACE', 'keyboardShortcuts.pushToTalk');