Moved keyboard initialization to filmstrip toolbar; Replaced toggle filmstrip button from extended toolbar

This commit is contained in:
Ilya Daynatovich 2016-11-09 12:41:23 +02:00
parent 056fc64f7a
commit 20c6dba599
2 changed files with 24 additions and 17 deletions

View File

@ -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',

View File

@ -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');
APP.UI.toggleFilmStrip();
};
APP.keyboardshortcut.registerShortcut(
shortcut,
shortcutAttr,
handler,
description
);
},
/**