diff --git a/modules/UI/toolbars/Toolbar.js b/modules/UI/toolbars/Toolbar.js index f7d4c4c5f..0517090cb 100644 --- a/modules/UI/toolbars/Toolbar.js +++ b/modules/UI/toolbars/Toolbar.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', diff --git a/modules/UI/videolayout/FilmStrip.js b/modules/UI/videolayout/FilmStrip.js index 2b9b0b3e4..a1aadd613 100644 --- a/modules/UI/videolayout/FilmStrip.js +++ b/modules/UI/videolayout/FilmStrip.js @@ -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 + ); }, /**