|
|
|
@ -1,7 +1,6 @@ |
|
|
|
|
/* global APP, $, config, interfaceConfig */ |
|
|
|
|
/* global APP, $, config, interfaceConfig, JitsiMeetJS */ |
|
|
|
|
/* jshint -W101 */ |
|
|
|
|
import UIUtil from '../util/UIUtil'; |
|
|
|
|
import AnalyticsAdapter from '../../statistics/AnalyticsAdapter'; |
|
|
|
|
import UIEvents from '../../../service/UI/UIEvents'; |
|
|
|
|
|
|
|
|
|
let roomUrl = null; |
|
|
|
@ -26,11 +25,11 @@ function openLinkDialog () { |
|
|
|
|
false, "dialog.Invite", |
|
|
|
|
function (e, v) { |
|
|
|
|
if (v && roomUrl) { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.invite.button'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.invite.button'); |
|
|
|
|
emitter.emit(UIEvents.USER_INVITED, roomUrl); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.invite.cancel'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.invite.cancel'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
function (event) { |
|
|
|
@ -44,7 +43,7 @@ function openLinkDialog () { |
|
|
|
|
}, |
|
|
|
|
function (e, v, m, f) { |
|
|
|
|
if(!v && !m && !f) |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.invite.close'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.invite.close'); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
@ -64,78 +63,78 @@ const buttonHandlers = { |
|
|
|
|
$("#unableToUnmutePopup"), true, 5000); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.audio.unmuted'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.audio.unmuted'); |
|
|
|
|
emitter.emit(UIEvents.AUDIO_MUTED, false, true); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.audio.muted'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.audio.muted'); |
|
|
|
|
emitter.emit(UIEvents.AUDIO_MUTED, true, true); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_camera": function () { |
|
|
|
|
if (APP.conference.videoMuted) { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.video.enabled'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.video.enabled'); |
|
|
|
|
emitter.emit(UIEvents.VIDEO_MUTED, false); |
|
|
|
|
} else { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.video.disabled'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.video.disabled'); |
|
|
|
|
emitter.emit(UIEvents.VIDEO_MUTED, true); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_security": function () { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.lock.clicked'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.lock.clicked'); |
|
|
|
|
emitter.emit(UIEvents.ROOM_LOCK_CLICKED); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_link": function () { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.invite.clicked'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.invite.clicked'); |
|
|
|
|
openLinkDialog(); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_chat": function () { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.chat.toggled'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.chat.toggled'); |
|
|
|
|
emitter.emit(UIEvents.TOGGLE_CHAT); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_etherpad": function () { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.etherpad.clicked'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.etherpad.clicked'); |
|
|
|
|
emitter.emit(UIEvents.ETHERPAD_CLICKED); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_sharedvideo": function () { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.sharedvideo.clicked'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.sharedvideo.clicked'); |
|
|
|
|
emitter.emit(UIEvents.SHARED_VIDEO_CLICKED); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_desktopsharing": function () { |
|
|
|
|
if (APP.conference.isSharingScreen) { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.screen.disabled'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.screen.disabled'); |
|
|
|
|
} else { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.screen.enabled'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.screen.enabled'); |
|
|
|
|
} |
|
|
|
|
emitter.emit(UIEvents.TOGGLE_SCREENSHARING); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_fullScreen": function() { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.fullscreen.enabled'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.fullscreen.enabled'); |
|
|
|
|
UIUtil.buttonClick("#toolbar_button_fullScreen", "icon-full-screen icon-exit-full-screen"); |
|
|
|
|
emitter.emit(UIEvents.FULLSCREEN_TOGGLE); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_sip": function () { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.sip.clicked'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.sip.clicked'); |
|
|
|
|
showSipNumberInput(); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_dialpad": function () { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.sip.dialpad.clicked'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.sip.dialpad.clicked'); |
|
|
|
|
dialpadButtonClicked(); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_settings": function () { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.settings.toggled'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.settings.toggled'); |
|
|
|
|
emitter.emit(UIEvents.TOGGLE_SETTINGS); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_hangup": function () { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.hangup'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.hangup'); |
|
|
|
|
emitter.emit(UIEvents.HANGUP); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_login": function () { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.authenticate.login.clicked'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.authenticate.login.clicked'); |
|
|
|
|
emitter.emit(UIEvents.AUTH_CLICKED); |
|
|
|
|
}, |
|
|
|
|
"toolbar_button_logout": function () { |
|
|
|
|
AnalyticsAdapter.sendEvent('toolbar.authenticate.logout.clicked'); |
|
|
|
|
JitsiMeetJS.analytics.sendEvent('toolbar.authenticate.logout.clicked'); |
|
|
|
|
// Ask for confirmation
|
|
|
|
|
APP.UI.messageHandler.openTwoButtonDialog( |
|
|
|
|
"dialog.logoutTitle", |
|
|
|
|