瀏覽代碼

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

* fix(keyboardshortcut) spacebar release mutes participant

* fix(keyboardshortcut) removed extra check
master
Calinteodor 3 年之前
父節點
當前提交
2a9b3dc1b2
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 3 行新增8 行删除
  1. 3
    8
      modules/keyboardshortcut/keyboardshortcut.js

+ 3
- 8
modules/keyboardshortcut/keyboardshortcut.js 查看文件

62
  * Maps keycode to character, id of popover for given function and function.
62
  * Maps keycode to character, id of popover for given function and function.
63
  */
63
  */
64
 const KeyboardShortcut = {
64
 const KeyboardShortcut = {
65
-    isPushToTalkActive: false,
66
 
65
 
67
     init() {
66
     init() {
68
         this._initGlobalShortcuts();
67
         this._initGlobalShortcuts();
97
                             PRESSED));
96
                             PRESSED));
98
                         logger.log('Talk shortcut pressed');
97
                         logger.log('Talk shortcut pressed');
99
                         APP.conference.muteAudio(false);
98
                         APP.conference.muteAudio(false);
100
-                        this.isPushToTalkActive = true;
101
                     }
99
                     }
102
                 }
100
                 }
103
             } else if (this._getKeyboardKey(e).toUpperCase() === 'ESCAPE') {
101
             } else if (this._getKeyboardKey(e).toUpperCase() === 'ESCAPE') {
232
         // register SPACE shortcut in two steps to insure visibility of help
230
         // register SPACE shortcut in two steps to insure visibility of help
233
         // message
231
         // message
234
         this.registerShortcut(' ', null, () => {
232
         this.registerShortcut(' ', null, () => {
235
-            if (this.isPushToTalkActive) {
236
-                sendAnalytics(createShortcutEvent('push.to.talk', RELEASED));
237
-                logger.log('Talk shortcut released');
238
-                APP.conference.muteAudio(true);
239
-                this.isPushToTalkActive = false;
240
-            }
233
+            sendAnalytics(createShortcutEvent('push.to.talk', RELEASED));
234
+            logger.log('Talk shortcut released');
235
+            APP.conference.muteAudio(true);
241
         });
236
         });
242
         this._addShortcutToHelp('SPACE', 'keyboardShortcuts.pushToTalk');
237
         this._addShortcutToHelp('SPACE', 'keyboardShortcuts.pushToTalk');
243
 
238
 

Loading…
取消
儲存