Merge pull request #1128 from BeatC/fix-toggle-filmstrip-shortcut

Moved keyboard initialization to filmstrip toolbar
pull/1113/merge 1478
Дамян Минков 8 years ago committed by GitHub
commit 92901e09e1
  1. 16
      modules/UI/toolbars/Toolbar.js
  2. 25
      modules/UI/videolayout/FilmStrip.js

@ -117,10 +117,6 @@ const buttonHandlers = {
}
});
},
"toolbar_film_strip": function () {
JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
emitter.emit(UIEvents.TOGGLE_FILM_STRIP);
},
"toolbar_button_raisehand": function () {
JitsiMeetJS.analytics.sendEvent('toolbar.raiseHand.clicked');
APP.conference.maybeToggleRaisedHand();
@ -261,18 +257,6 @@ const defaultToolbarButtons = {
content: "Hang Up",
i18n: "[content]toolbar.hangup"
},
'filmstrip': {
id: 'toolbar_film_strip',
tooltipKey: 'toolbar.filmstrip',
className: "button icon-toggle-filmstrip",
shortcut: "F",
shortcutAttr: "filmstripPopover",
shortcutFunc: function() {
JitsiMeetJS.analytics.sendEvent("shortcut.film.toggled");
APP.UI.toggleFilmStrip();
},
shortcutDescription: "keyboardShortcuts.toggleFilmstrip"
},
'raisehand': {
id: "toolbar_button_raisehand",
tooltipKey: 'toolbar.raiseHand',

@ -1,4 +1,4 @@
/* global $, interfaceConfig */
/* global $, APP, JitsiMeetJS, interfaceConfig */
import UIEvents from "../../../service/UI/UIEvents";
import UIUtil from "../util/UIUtil";
@ -58,6 +58,29 @@ const FilmStrip = {
let toggleFilmstripMethod = this.toggleFilmStrip.bind(this);
let selector = '#hideVideoToolbar';
$('#videospace').on('click', selector, toggleFilmstripMethod);
this._registerToggleFilmstripShortcut();
},
/**
* Registering toggle filmstrip shortcut
* @private
*/
_registerToggleFilmstripShortcut() {
let shortcut = 'F';
let shortcutAttr = 'filmstripPopover';
let description = 'keyboardShortcuts.toggleFilmstrip';
let handler = () => {
JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
this.eventEmitter.emit(UIEvents.TOGGLE_FILM_STRIP);
};
APP.keyboardshortcut.registerShortcut(
shortcut,
shortcutAttr,
handler,
description
);
},
/**

Loading…
Cancel
Save