Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
style(analytics): sendEvent -> sendAnalyticsEvent
hristoterezov0b50578de954
diff --git a/conference.js b/conference.jsindex 04cc4807f2..a0fc894d2f 100644--- a/conference.js+++ b/conference.js@@ -15,7 +15,7 @@ import UIEvents from './service/UI/UIEvents';import UIUtil from './modules/UI/util/UIUtil';import * as JitsiMeetConferenceEvents from './ConferenceEvents';-import { initAnalytics, sendEvent } from './react/features/analytics';+import { initAnalytics, sendAnalyticsEvent } from './react/features/analytics';import EventEmitter from 'events';@@ -719,12 +719,12 @@ export default {.then(([ tracks, con ]) => {tracks.forEach(track => {if (track.isAudioTrack() && this.isLocalAudioMuted()) {- sendEvent('conference.audio.initiallyMuted');+ sendAnalyticsEvent('conference.audio.initiallyMuted');logger.log('Audio mute: initially muted');track.mute();} else if (track.isVideoTrack()&& this.isLocalVideoMuted()) {- sendEvent('conference.video.initiallyMuted');+ sendAnalyticsEvent('conference.video.initiallyMuted');logger.log('Video mute: initially muted');track.mute();}@@ -1423,7 +1423,7 @@ export default {promise = createLocalTracksF({ devices: [ 'video' ] }).then(([ stream ]) => this.useVideoStream(stream)).then(() => {- sendEvent(+ sendAnalyticsEvent('conference.sharingDesktop.stop');logger.log('switched back to local video');if (!this.localVideo && wasVideoMuted) {@@ -1603,7 +1603,7 @@ export default {.then(stream => this.useVideoStream(stream)).then(() => {this.videoSwitchInProgress = false;- sendEvent('conference.sharingDesktop.start');+ sendAnalyticsEvent('conference.sharingDesktop.start');logger.log('sharing local desktop');}).catch(error => {@@ -1896,7 +1896,7 @@ export default {room.selectParticipant(id);} catch (e) {- sendEvent(+ sendAnalyticsEvent('selectParticipant.failed');reportError(e);}@@ -2138,7 +2138,7 @@ export default {// Longer delays will be caused by something else and will just// poison the data.if (delay < 2000) {- sendEvent('stream.switch.delay', { value: delay });+ sendAnalyticsEvent('stream.switch.delay', { value: delay });}});@@ -2171,7 +2171,7 @@ export default {APP.UI.addListener(UIEvents.VIDEO_DEVICE_CHANGED,cameraDeviceId => {- sendEvent('settings.changeDevice.video');+ sendAnalyticsEvent('settings.changeDevice.video');createLocalTracksF({devices: [ 'video' ],cameraDeviceId,@@ -2199,7 +2199,7 @@ export default {APP.UI.addListener(UIEvents.AUDIO_DEVICE_CHANGED,micDeviceId => {- sendEvent(+ sendAnalyticsEvent('settings.changeDevice.audioIn');createLocalTracksF({devices: [ 'audio' ],@@ -2220,7 +2220,7 @@ export default {APP.UI.addListener(UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,audioOutputDeviceId => {- sendEvent(+ sendAnalyticsEvent('settings.changeDevice.audioOut');APP.settings.setAudioOutputDeviceId(audioOutputDeviceId).then(() => logger.log('changed audio output device'))@@ -2428,7 +2428,7 @@ export default {if (audioWasMuted|| currentDevices.audioinput.length> availableAudioInputDevices.length) {- sendEvent('deviceListChanged.audio.muted');+ sendAnalyticsEvent('deviceListChanged.audio.muted');logger.log('Audio mute: device list changed');muteLocalAudio(true);}@@ -2439,7 +2439,7 @@ export default {&& (videoWasMuted|| currentDevices.videoinput.length> availableVideoInputDevices.length)) {- sendEvent('deviceListChanged.video.muted');+ sendAnalyticsEvent('deviceListChanged.video.muted');logger.log('Video mute: device list changed');muteLocalVideo(true);}@@ -2535,7 +2535,7 @@ export default {* NOTE: Should be used after conference.init*/logEvent(name, value, label) {- sendEvent(name, {+ sendAnalyticsEvent(name, {value,label});diff --git a/modules/API/API.js b/modules/API/API.jsindex 9efad67945..b8a0e90c91 100644--- a/modules/API/API.js+++ b/modules/API/API.js@@ -2,7 +2,7 @@import * as JitsiMeetConferenceEvents from '../../ConferenceEvents';import { parseJWTFromURLParams } from '../../react/features/base/jwt';-import { sendEvent } from '../../react/features/analytics';+import { sendAnalyticsEvent } from '../../react/features/analytics';import { getJitsiMeetTransport } from '../transport';import { API_ID } from './constants';@@ -55,12 +55,12 @@ function initCommands() {'display-name':APP.conference.changeLocalDisplayName.bind(APP.conference),'toggle-audio': () => {- sendEvent('api.toggle.audio');+ sendAnalyticsEvent('api.toggle.audio');logger.log('Audio toggle: API command received');APP.conference.toggleAudioMuted(false /* no UI */);},'toggle-video': () => {- sendEvent('api.toggle.video');+ sendAnalyticsEvent('api.toggle.video');logger.log('Video toggle: API command received');APP.conference.toggleVideoMuted(false /* no UI */);},diff --git a/modules/UI/recording/Recording.js b/modules/UI/recording/Recording.jsindex 0b458fd533..7dc0cc0720 100644--- a/modules/UI/recording/Recording.js+++ b/modules/UI/recording/Recording.js@@ -24,7 +24,7 @@ import {JitsiRecordingStatus} from '../../../react/features/base/lib-jitsi-meet';import {- sendEvent+ sendAnalyticsEvent} from '../../../react/features/analytics';import { setToolboxEnabled } from '../../../react/features/toolbox';import { setNotificationsEnabled } from '../../../react/features/notifications';@@ -456,7 +456,7 @@ const Recording = {return;}- sendEvent('recording.clicked');+ sendAnalyticsEvent('recording.clicked');switch (this.currentState) {case JitsiRecordingStatus.ON:case JitsiRecordingStatus.RETRYING:@@ -464,7 +464,7 @@ const Recording = {_showStopRecordingPrompt(this.recordingType).then(() => {this.eventEmitter.emit(UIEvents.RECORDING_TOGGLED);- sendEvent('recording.stopped');+ sendAnalyticsEvent('recording.stopped');},() => {}); // eslint-disable-line no-empty-functionbreak;@@ -477,11 +477,11 @@ const Recording = {this.eventEmitter.emit(UIEvents.RECORDING_TOGGLED,{ streamId });- sendEvent('recording.started');+ sendAnalyticsEvent('recording.started');}).catch(reason => {if (reason === APP.UI.messageHandler.CANCEL) {- sendEvent('recording.canceled');+ sendAnalyticsEvent('recording.canceled');} else {logger.error(reason);}@@ -491,7 +491,7 @@ const Recording = {this.eventEmitter.emit(UIEvents.RECORDING_TOGGLED,{ token: this.predefinedToken });- sendEvent('recording.started');+ sendAnalyticsEvent('recording.started');return;}@@ -500,11 +500,11 @@ const Recording = {this.eventEmitter.emit(UIEvents.RECORDING_TOGGLED,{ token });- sendEvent('recording.started');+ sendAnalyticsEvent('recording.started');}).catch(reason => {if (reason === APP.UI.messageHandler.CANCEL) {- sendEvent('recording.canceled');+ sendAnalyticsEvent('recording.canceled');} else {logger.error(reason);}diff --git a/modules/UI/shared_video/SharedVideo.js b/modules/UI/shared_video/SharedVideo.jsindex 62c50a7c49..77b26fdfab 100644--- a/modules/UI/shared_video/SharedVideo.js+++ b/modules/UI/shared_video/SharedVideo.js@@ -8,7 +8,7 @@ import VideoLayout from '../videolayout/VideoLayout';import LargeContainer from '../videolayout/LargeContainer';import Filmstrip from '../videolayout/Filmstrip';-import { sendEvent } from '../../../react/features/analytics';+import { sendAnalyticsEvent } from '../../../react/features/analytics';import {participantJoined,participantLeft@@ -83,11 +83,11 @@ export default class SharedVideoManager {url => {this.emitter.emit(UIEvents.UPDATE_SHARED_VIDEO, url, 'start');- sendEvent('sharedvideo.started');+ sendAnalyticsEvent('sharedvideo.started');},err => {logger.log('SHARED VIDEO CANCELED', err);- sendEvent('sharedvideo.canceled');+ sendAnalyticsEvent('sharedvideo.canceled');});@@ -107,7 +107,7 @@ export default class SharedVideoManager {}this.emitter.emit(UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop');- sendEvent('sharedvideo.stoped');+ sendAnalyticsEvent('sharedvideo.stoped');},() => {}); // eslint-disable-line no-empty-function} else {@@ -119,7 +119,7 @@ export default class SharedVideoManager {dialog = null;});- sendEvent('sharedvideo.alreadyshared');+ sendAnalyticsEvent('sharedvideo.alreadyshared');}}@@ -228,7 +228,7 @@ export default class SharedVideoManager {// eslint-disable-next-line eqeqeq} else if (event.data == YT.PlayerState.PAUSED) {self.smartAudioUnmute();- sendEvent('sharedvideo.paused');+ sendAnalyticsEvent('sharedvideo.paused');}// eslint-disable-next-line eqeqeqself.fireSharedVideoEvent(event.data == YT.PlayerState.PAUSED);@@ -260,7 +260,7 @@ export default class SharedVideoManager {} else if (event.data.volume <= 0 || event.data.muted) {self.smartAudioUnmute();}- sendEvent('sharedvideo.volumechanged');+ sendAnalyticsEvent('sharedvideo.volumechanged');};window.onPlayerReady = function(event) {@@ -566,7 +566,7 @@ export default class SharedVideoManager {if (APP.conference.isLocalAudioMuted()&& !this.mutedWithUserInteraction&& !this.isSharedVideoVolumeOn()) {- sendEvent('sharedvideo.audio.unmuted');+ sendAnalyticsEvent('sharedvideo.audio.unmuted');logger.log('Shared video: audio unmuted');this.emitter.emit(UIEvents.AUDIO_MUTED, false, false);this.showMicMutedPopup(false);@@ -580,7 +580,7 @@ export default class SharedVideoManager {smartAudioMute() {if (!APP.conference.isLocalAudioMuted()&& this.isSharedVideoVolumeOn()) {- sendEvent('sharedvideo.audio.muted');+ sendAnalyticsEvent('sharedvideo.audio.muted');logger.log('Shared video: audio muted');this.emitter.emit(UIEvents.AUDIO_MUTED, true, false);this.showMicMutedPopup(true);diff --git a/modules/UI/side_pannels/profile/Profile.js b/modules/UI/side_pannels/profile/Profile.jsindex 9c12543fe0..bad236d78d 100644--- a/modules/UI/side_pannels/profile/Profile.js+++ b/modules/UI/side_pannels/profile/Profile.js@@ -3,7 +3,7 @@ import UIUtil from '../../util/UIUtil';import UIEvents from '../../../../service/UI/UIEvents';import Settings from '../../../settings/Settings';-import { sendEvent } from '../../../../react/features/analytics';+import { sendAnalyticsEvent } from '../../../../react/features/analytics';const sidePanelsContainerId = 'sideToolbarContainer';const htmlStr = `@@ -91,7 +91,7 @@ export default {**/function loginClicked() {- sendEvent('authenticate.login.clicked');+ sendAnalyticsEvent('authenticate.login.clicked');emitter.emit(UIEvents.AUTH_CLICKED);}@@ -104,7 +104,7 @@ export default {const titleKey = 'dialog.logoutTitle';const msgKey = 'dialog.logoutQuestion';- sendEvent('authenticate.logout.clicked');+ sendAnalyticsEvent('authenticate.logout.clicked');// Ask for confirmationAPP.UI.messageHandler.openTwoButtonDialog({diff --git a/modules/UI/videolayout/Filmstrip.js b/modules/UI/videolayout/Filmstrip.jsindex edaf3daf89..2ec52b1318 100644--- a/modules/UI/videolayout/Filmstrip.js+++ b/modules/UI/videolayout/Filmstrip.js@@ -5,7 +5,7 @@ import { setFilmstripVisibility } from '../../../react/features/filmstrip';import UIEvents from '../../../service/UI/UIEvents';import UIUtil from '../util/UIUtil';-import { sendEvent } from '../../../react/features/analytics';+import { sendAnalyticsEvent } from '../../../react/features/analytics';const Filmstrip = {/**@@ -150,7 +150,7 @@ const Filmstrip = {return;}if (sendAnalytics) {- sendEvent('toolbar.filmstrip.toggled');+ sendAnalyticsEvent('toolbar.filmstrip.toggled');}this.filmstrip.toggleClass('hidden');diff --git a/modules/keyboardshortcut/keyboardshortcut.js b/modules/keyboardshortcut/keyboardshortcut.jsindex 4ff4fa959b..faffcb2c36 100644--- a/modules/keyboardshortcut/keyboardshortcut.js+++ b/modules/keyboardshortcut/keyboardshortcut.js@@ -1,7 +1,7 @@/* global APP, $, interfaceConfig */import { toggleDialog } from '../../react/features/base/dialog';-import { sendEvent } from '../../react/features/analytics';+import { sendAnalyticsEvent } from '../../react/features/analytics';import { SpeakerStats } from '../../react/features/speaker-stats';const logger = require('jitsi-meet-logger').getLogger(__filename);@@ -81,7 +81,7 @@ const KeyboardShortcut = {|| $(':focus').is('textarea'))) {if (this._getKeyboardKey(e).toUpperCase() === ' ') {if (APP.conference.isLocalAudioMuted()) {- sendEvent('shortcut.talk.released');+ sendAnalyticsEvent('shortcut.talk.released');logger.log('Talk shortcut released');APP.conference.muteAudio(false);}@@ -260,14 +260,14 @@ const KeyboardShortcut = {});this.registerShortcut('?', null, () => {- sendEvent('shortcut.shortcut.help');+ sendAnalyticsEvent('shortcut.shortcut.help');showKeyboardShortcutsPanel(true);}, 'keyboardShortcuts.toggleShortcuts');// register SPACE shortcut in two steps to insure visibility of help// messagethis.registerShortcut(' ', null, () => {- sendEvent('shortcut.talk.clicked');+ sendAnalyticsEvent('shortcut.talk.clicked');logger.log('Talk shortcut pressed');APP.conference.muteAudio(true);});@@ -275,7 +275,7 @@ const KeyboardShortcut = {if (!interfaceConfig.filmStripOnly) {this.registerShortcut('T', null, () => {- sendEvent('shortcut.speakerStats.clicked');+ sendAnalyticsEvent('shortcut.speakerStats.clicked');APP.store.dispatch(toggleDialog(SpeakerStats, {conference: APP.conference}));diff --git a/react/features/analytics/functions.js b/react/features/analytics/functions.jsindex 6f87d7c58d..cb92447e42 100644--- a/react/features/analytics/functions.js+++ b/react/features/analytics/functions.js@@ -8,7 +8,7 @@ import { getJitsiMeetGlobalNS, loadScript } from '../base/util';const logger = require('jitsi-meet-logger').getLogger(__filename);-export const sendEvent = analytics.sendEvent.bind(analytics);+export const sendAnalyticsEvent = analytics.sendEvent.bind(analytics);/*** Loads the analytics scripts and inits JitsiMeetJS.analytics by settingdiff --git a/react/features/base/conference/actions.js b/react/features/base/conference/actions.jsindex fa49faae91..c6653a9830 100644--- a/react/features/base/conference/actions.js+++ b/react/features/base/conference/actions.js@@ -1,6 +1,6 @@// @flow-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { getName } from '../../app';import { JitsiConferenceEvents } from '../lib-jitsi-meet';import { setAudioMuted, setVideoMuted } from '../media';@@ -78,9 +78,9 @@ function _addConferenceListeners(conference, dispatch) {const audioMuted = Boolean(conference.startAudioMuted);const videoMuted = Boolean(conference.startVideoMuted);- sendEvent(+ sendAnalyticsEvent(`startmuted.server.audio.${audioMuted ? 'muted' : 'unmuted'}`);- sendEvent(+ sendAnalyticsEvent(`startmuted.server.video.${videoMuted ? 'muted' : 'unmuted'}`);logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${videoMuted ? 'video' : ''}`);diff --git a/react/features/base/conference/middleware.js b/react/features/base/conference/middleware.jsindex 774cccc711..23b137a40a 100644--- a/react/features/base/conference/middleware.js+++ b/react/features/base/conference/middleware.js@@ -2,7 +2,7 @@import UIEvents from '../../../../service/UI/UIEvents';-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { CONNECTION_ESTABLISHED } from '../connection';import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../media';import {@@ -124,7 +124,7 @@ function _conferenceFailedOrLeft({ dispatch, getState }, next, action) {const result = next(action);if (getState()['features/base/conference'].audioOnly) {- sendEvent('audioonly.disabled');+ sendAnalyticsEvent('audioonly.disabled');logger.log('Audio only disabled');dispatch(setAudioOnly(false));}@@ -196,7 +196,7 @@ function _pinParticipant(store, next, action) {videoType = 'remote';}- sendEvent(+ sendAnalyticsEvent(`${actionName}.${videoType}`,{ value: conference.getParticipantCount() });}diff --git a/react/features/base/media/middleware.js b/react/features/base/media/middleware.jsindex 2d815c74f7..12fde30190 100644--- a/react/features/base/media/middleware.js+++ b/react/features/base/media/middleware.js@@ -1,6 +1,6 @@/* @flow */-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { SET_ROOM, setAudioOnly } from '../conference';import { parseURLParams } from '../config';import { MiddlewareRegistry } from '../redux';@@ -85,8 +85,10 @@ function _setRoom({ dispatch, getState }, next, action) {// Apply the config.- sendEvent(`startmuted.client.audio.${audioMuted ? 'muted' : 'unmuted'}`);- sendEvent(`startmuted.client.video.${videoMuted ? 'muted' : 'unmuted'}`);+ sendAnalyticsEvent(+ `startmuted.client.audio.${audioMuted ? 'muted' : 'unmuted'}`);+ sendAnalyticsEvent(+ `startmuted.client.video.${videoMuted ? 'muted' : 'unmuted'}`);logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${videoMuted ? 'video' : ''}`);@@ -110,7 +112,8 @@ function _setRoom({ dispatch, getState }, next, action) {typeof audioOnly === 'undefined' && (audioOnly = config.startAudioOnly);audioOnly = Boolean(audioOnly);- sendEvent(`startaudioonly.${audioOnly ? 'enabled' : 'disabled'}`);+ sendAnalyticsEvent(+ `startaudioonly.${audioOnly ? 'enabled' : 'disabled'}`);logger.log(`Start audio only set to ${audioOnly.toString()}`);dispatch(setAudioOnly(audioOnly));}@@ -136,7 +139,7 @@ function _syncTrackMutedState({ getState }, track) {// not yet in redux state and JitsiTrackEvents.TRACK_MUTE_CHANGED may be// fired before track gets to state.if (track.muted !== muted) {- sendEvent(+ sendAnalyticsEvent(`synctrackstate.${track.mediaType}.${muted ? 'muted' : 'unmuted'}`);logger.log(`Sync ${track.mediaType} track muted state to ${muted ? 'muted' : 'unmuted'}`);diff --git a/react/features/base/tracks/actions.js b/react/features/base/tracks/actions.jsindex 89abafa188..42a959885d 100644--- a/react/features/base/tracks/actions.js+++ b/react/features/base/tracks/actions.js@@ -1,4 +1,4 @@-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { JitsiTrackErrors, JitsiTrackEvents } from '../lib-jitsi-meet';import {CAMERA_FACING_MODE,@@ -159,7 +159,8 @@ export function replaceLocalTrack(oldTrack, newTrack, conference) {: setAudioMuted;const isMuted = newTrack.isMuted();- sendEvent(`replacetrack.${newTrack.getType()}.${+ sendAnalyticsEvent(`replacetrack.${+ newTrack.getType()}.${isMuted ? 'muted' : 'unmuted'}`);logger.log(`Replace ${newTrack.getType()} track - ${isMuted ? 'muted' : 'unmuted'}`);diff --git a/react/features/feedback/components/FeedbackDialog.web.js b/react/features/feedback/components/FeedbackDialog.web.jsindex a9f27ee8d8..affe0eb743 100644--- a/react/features/feedback/components/FeedbackDialog.web.js+++ b/react/features/feedback/components/FeedbackDialog.web.js@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';import React, { Component } from 'react';import { connect } from 'react-redux';-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { Dialog } from '../../base/dialog';import { translate } from '../../base/i18n';@@ -145,7 +145,7 @@ class FeedbackDialog extends Component {* @inheritdoc*/componentDidMount() {- sendEvent('feedback.open');+ sendAnalyticsEvent('feedback.open');}/**diff --git a/react/features/invite/components/InviteDialog.web.js b/react/features/invite/components/InviteDialog.web.jsindex 940ebaf701..50ad416f3f 100644--- a/react/features/invite/components/InviteDialog.web.js+++ b/react/features/invite/components/InviteDialog.web.js@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';import React, { Component } from 'react';import { connect } from 'react-redux';-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { getInviteURL } from '../../base/connection';import { Dialog } from '../../base/dialog';import { translate } from '../../base/i18n';@@ -51,7 +51,7 @@ class InviteDialog extends Component {* @inheritdoc*/componentWillUnmount() {- sendEvent('toolbar.invite.close');+ sendAnalyticsEvent('toolbar.invite.close');}/**diff --git a/react/features/mobile/background/actions.js b/react/features/mobile/background/actions.jsindex 1c2d26b6f7..74ac2f98e8 100644--- a/react/features/mobile/background/actions.js+++ b/react/features/mobile/background/actions.js@@ -1,6 +1,6 @@/* @flow */-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { setLastN } from '../../base/conference';import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../../base/media';@@ -43,7 +43,7 @@ export function _setBackgroundVideoMuted(muted: boolean) {audioOnly || dispatch(setLastN(muted ? 0 : undefined));- sendEvent('callkit.background.video.muted');+ sendAnalyticsEvent('callkit.background.video.muted');dispatch(setVideoMuted(muted, VIDEO_MUTISM_AUTHORITY.BACKGROUND));};diff --git a/react/features/mobile/callkit/middleware.js b/react/features/mobile/callkit/middleware.jsindex 197ce8ccec..538f749615 100644--- a/react/features/mobile/callkit/middleware.js+++ b/react/features/mobile/callkit/middleware.js@@ -3,7 +3,7 @@import { NativeModules } from 'react-native';import uuid from 'uuid';-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { APP_WILL_MOUNT, APP_WILL_UNMOUNT, appNavigate } from '../../app';import {CONFERENCE_FAILED,@@ -271,7 +271,7 @@ function _onPerformSetMutedCallAction({ callUUID, muted: newValue }) {if (oldValue !== newValue) {const value = Boolean(newValue);- sendEvent(`callkit.audio.${value ? 'muted' : 'unmuted'}`);+ sendAnalyticsEvent(`callkit.audio.${value ? 'muted' : 'unmuted'}`);dispatch(setAudioMuted(value));}}diff --git a/react/features/remote-video-menu/components/KickButton.js b/react/features/remote-video-menu/components/KickButton.jsindex b626b1469c..90fad3ae59 100644--- a/react/features/remote-video-menu/components/KickButton.js+++ b/react/features/remote-video-menu/components/KickButton.js@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';import React, { Component } from 'react';import { connect } from 'react-redux';-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { translate } from '../../base/i18n';import { kickParticipant } from '../../base/participants';@@ -83,7 +83,7 @@ class KickButton extends Component {_onClick() {const { dispatch, onClick, participantID } = this.props;- sendEvent(+ sendAnalyticsEvent('remotevideomenu.kick',{value: 1,diff --git a/react/features/remote-video-menu/components/MuteButton.js b/react/features/remote-video-menu/components/MuteButton.jsindex a647b42cb8..73f49e8442 100644--- a/react/features/remote-video-menu/components/MuteButton.js+++ b/react/features/remote-video-menu/components/MuteButton.js@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';import React, { Component } from 'react';import { connect } from 'react-redux';-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { translate } from '../../base/i18n';import { muteRemoteParticipant } from '../../base/participants';@@ -97,7 +97,7 @@ class MuteButton extends Component {_onClick() {const { dispatch, onClick, participantID } = this.props;- sendEvent(+ sendAnalyticsEvent('remotevideomenu.mute.clicked',{value: 1,diff --git a/react/features/remote-video-menu/components/RemoteControlButton.js b/react/features/remote-video-menu/components/RemoteControlButton.jsindex 2a87854759..88a33ee65d 100644--- a/react/features/remote-video-menu/components/RemoteControlButton.js+++ b/react/features/remote-video-menu/components/RemoteControlButton.js@@ -1,7 +1,7 @@import PropTypes from 'prop-types';import React, { Component } from 'react';-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { translate } from '../../base/i18n';import RemoteVideoMenuButton from './RemoteVideoMenuButton';@@ -130,7 +130,7 @@ class RemoteControlButton extends Component {}if (eventName) {- sendEvent(+ sendAnalyticsEvent(`remotevideomenu.remotecontrol.${eventName}`,{value: 1,diff --git a/react/features/toolbox/components/ProfileButton.web.js b/react/features/toolbox/components/ProfileButton.web.jsindex 68af7c6dbc..c94d553bd3 100644--- a/react/features/toolbox/components/ProfileButton.web.js+++ b/react/features/toolbox/components/ProfileButton.web.js@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';import React, { Component } from 'react';import { connect } from 'react-redux';-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { DEFAULT_AVATAR_RELATIVE_PATH } from '../../base/participants';import UIEvents from '../../../../service/UI/UIEvents';@@ -102,7 +102,7 @@ class ProfileButton extends Component {*/_onClick() {if (!this.props._unclickable) {- sendEvent('toolbar.profile.toggled');+ sendAnalyticsEvent('toolbar.profile.toggled');APP.UI.emitEvent(UIEvents.TOGGLE_PROFILE);}}diff --git a/react/features/toolbox/components/Toolbox.native.js b/react/features/toolbox/components/Toolbox.native.jsindex 1ccc7aefb6..2a916b74dd 100644--- a/react/features/toolbox/components/Toolbox.native.js+++ b/react/features/toolbox/components/Toolbox.native.js@@ -3,7 +3,7 @@ import React, { Component } from 'react';import { View } from 'react-native';import { connect } from 'react-redux';-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import { toggleAudioOnly } from '../../base/conference';import {MEDIA_TYPE,@@ -177,7 +177,7 @@ class Toolbox extends Component {_onToggleAudio() {const mute = !this.props._audioMuted;- sendEvent(`toolbar.audio.${mute ? 'muted' : 'unmuted'}`);+ sendAnalyticsEvent(`toolbar.audio.${mute ? 'muted' : 'unmuted'}`);// The user sees the reality i.e. the state of base/tracks and intends// to change reality by tapping on the respective button i.e. the user@@ -200,7 +200,7 @@ class Toolbox extends Component {_onToggleVideo() {const mute = !this.props._videoMuted;- sendEvent(`toolbar.video.${mute ? 'muted' : 'unmuted'}`);+ sendAnalyticsEvent(`toolbar.video.${mute ? 'muted' : 'unmuted'}`);// The user sees the reality i.e. the state of base/tracks and intends// to change reality by tapping on the respective button i.e. the userdiff --git a/react/features/toolbox/defaultToolbarButtons.web.js b/react/features/toolbox/defaultToolbarButtons.web.jsindex f4957b95f7..5dd0203634 100644--- a/react/features/toolbox/defaultToolbarButtons.web.js+++ b/react/features/toolbox/defaultToolbarButtons.web.js@@ -2,7 +2,7 @@import React from 'react';-import { sendEvent } from '../analytics';+import { sendAnalyticsEvent } from '../analytics';import { ParticipantCounter } from '../contact-list';import { openDeviceSelectionDialog } from '../device-selection';import { InfoDialogButton, openInviteDialog } from '../invite';@@ -42,9 +42,9 @@ export default function getDefaultButtons() {const newVideoMutedState = !APP.conference.isLocalVideoMuted();if (newVideoMutedState) {- sendEvent('toolbar.video.enabled');+ sendAnalyticsEvent('toolbar.video.enabled');} else {- sendEvent('toolbar.video.disabled');+ sendAnalyticsEvent('toolbar.video.disabled');}APP.UI.emitEvent(UIEvents.VIDEO_MUTED, newVideoMutedState);},@@ -64,7 +64,7 @@ export default function getDefaultButtons() {return;}- sendEvent('shortcut.videomute.toggled');+ sendAnalyticsEvent('shortcut.videomute.toggled');APP.conference.toggleVideoMuted();},shortcutDescription: 'keyboardShortcuts.videoMute',@@ -81,13 +81,13 @@ export default function getDefaultButtons() {<span id = 'unreadMessages' /></span>,id: 'toolbar_button_chat',onClick() {- sendEvent('toolbar.chat.toggled');+ sendAnalyticsEvent('toolbar.chat.toggled');APP.UI.emitEvent(UIEvents.TOGGLE_CHAT);},shortcut: 'C',shortcutAttr: 'toggleChatPopover',shortcutFunc() {- sendEvent('shortcut.chat.toggled');+ sendAnalyticsEvent('shortcut.chat.toggled');APP.UI.toggleChat();},shortcutDescription: 'keyboardShortcuts.toggleChat',@@ -104,7 +104,7 @@ export default function getDefaultButtons() {enabled: true,id: 'toolbar_contact_list',onClick() {- sendEvent(+ sendAnalyticsEvent('toolbar.contacts.toggled');APP.UI.emitEvent(UIEvents.TOGGLE_CONTACT_LIST);},@@ -121,9 +121,9 @@ export default function getDefaultButtons() {id: 'toolbar_button_desktopsharing',onClick() {if (APP.conference.isSharingScreen) {- sendEvent('toolbar.screen.disabled');+ sendAnalyticsEvent('toolbar.screen.disabled');} else {- sendEvent('toolbar.screen.enabled');+ sendAnalyticsEvent('toolbar.screen.enabled');}APP.UI.emitEvent(UIEvents.TOGGLE_SCREENSHARING);},@@ -137,7 +137,7 @@ export default function getDefaultButtons() {shortcut: 'D',shortcutAttr: 'toggleDesktopSharingPopover',shortcutFunc() {- sendEvent('shortcut.screen.toggled');+ sendAnalyticsEvent('shortcut.screen.toggled');// eslint-disable-next-line no-empty-functionAPP.conference.toggleScreenSharing().catch(() => {});@@ -157,7 +157,7 @@ export default function getDefaultButtons() {},id: 'toolbar_button_fodeviceselection',onClick(dispatch: Function) {- sendEvent(+ sendAnalyticsEvent('toolbar.fodeviceselection.toggled');dispatch(openDeviceSelectionDialog());@@ -177,7 +177,7 @@ export default function getDefaultButtons() {hidden: true,id: 'toolbar_button_dialpad',onClick() {- sendEvent('toolbar.sip.dialpad.clicked');+ sendAnalyticsEvent('toolbar.sip.dialpad.clicked');},tooltipKey: 'toolbar.dialpad'},@@ -191,7 +191,7 @@ export default function getDefaultButtons() {hidden: true,id: 'toolbar_button_etherpad',onClick() {- sendEvent('toolbar.etherpad.clicked');+ sendAnalyticsEvent('toolbar.etherpad.clicked');APP.UI.emitEvent(UIEvents.ETHERPAD_CLICKED);},tooltipKey: 'toolbar.etherpad'@@ -205,7 +205,7 @@ export default function getDefaultButtons() {enabled: true,id: 'toolbar_button_fullScreen',onClick() {- sendEvent('toolbar.fullscreen.enabled');+ sendAnalyticsEvent('toolbar.fullscreen.enabled');APP.UI.emitEvent(UIEvents.TOGGLE_FULLSCREEN);},@@ -213,7 +213,7 @@ export default function getDefaultButtons() {shortcutAttr: 'toggleFullscreenPopover',shortcutDescription: 'keyboardShortcuts.fullScreen',shortcutFunc() {- sendEvent('shortcut.fullscreen.toggled');+ sendAnalyticsEvent('shortcut.fullscreen.toggled');APP.UI.toggleFullScreen();},tooltipKey: 'toolbar.fullscreen'@@ -229,7 +229,7 @@ export default function getDefaultButtons() {isDisplayed: () => true,id: 'toolbar_button_hangup',onClick() {- sendEvent('toolbar.hangup');+ sendAnalyticsEvent('toolbar.hangup');APP.UI.emitEvent(UIEvents.HANGUP);},tooltipKey: 'toolbar.hangup'@@ -252,7 +252,7 @@ export default function getDefaultButtons() {enabled: true,id: 'toolbar_button_link',onClick(dispatch: Function) {- sendEvent('toolbar.invite.clicked');+ sendAnalyticsEvent('toolbar.invite.clicked');dispatch(openInviteDialog());},@@ -280,11 +280,11 @@ export default function getDefaultButtons() {APP.UI.showCustomToolbarPopup('microphone', 'unableToUnmutePopup', true, 5000);} else {- sendEvent('toolbar.audio.unmuted');+ sendAnalyticsEvent('toolbar.audio.unmuted');APP.UI.emitEvent(UIEvents.AUDIO_MUTED, false, true);}} else {- sendEvent('toolbar.audio.muted');+ sendAnalyticsEvent('toolbar.audio.muted');APP.UI.emitEvent(UIEvents.AUDIO_MUTED, true, true);}},@@ -305,7 +305,7 @@ export default function getDefaultButtons() {shortcut: 'M',shortcutAttr: 'mutePopover',shortcutFunc() {- sendEvent('shortcut.audiomute.toggled');+ sendAnalyticsEvent('shortcut.audiomute.toggled');APP.conference.toggleAudioMuted();},shortcutDescription: 'keyboardShortcuts.mute',@@ -328,14 +328,14 @@ export default function getDefaultButtons() {enabled: true,id: 'toolbar_button_raisehand',onClick() {- sendEvent('toolbar.raiseHand.clicked');+ sendAnalyticsEvent('toolbar.raiseHand.clicked');APP.conference.maybeToggleRaisedHand();},shortcut: 'R',shortcutAttr: 'raiseHandPopover',shortcutDescription: 'keyboardShortcuts.raiseHand',shortcutFunc() {- sendEvent('shortcut.raisehand.clicked');+ sendAnalyticsEvent('shortcut.raisehand.clicked');APP.conference.maybeToggleRaisedHand();},tooltipKey: 'toolbar.raiseHand'@@ -363,7 +363,7 @@ export default function getDefaultButtons() {enabled: true,id: 'toolbar_button_settings',onClick() {- sendEvent('toolbar.settings.toggled');+ sendAnalyticsEvent('toolbar.settings.toggled');APP.UI.emitEvent(UIEvents.TOGGLE_SETTINGS);},sideContainerId: 'settings_container',@@ -378,7 +378,7 @@ export default function getDefaultButtons() {enabled: true,id: 'toolbar_button_sharedvideo',onClick() {- sendEvent('toolbar.sharedvideo.clicked');+ sendAnalyticsEvent('toolbar.sharedvideo.clicked');APP.UI.emitEvent(UIEvents.SHARED_VIDEO_CLICKED);},popups: [diff --git a/react/features/video-quality/components/VideoQualityDialog.web.js b/react/features/video-quality/components/VideoQualityDialog.web.jsindex df6fcdc597..97cc19f118 100644--- a/react/features/video-quality/components/VideoQualityDialog.web.js+++ b/react/features/video-quality/components/VideoQualityDialog.web.js@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';import React, { Component } from 'react';import { connect } from 'react-redux';-import { sendEvent } from '../../analytics';+import { sendAnalyticsEvent } from '../../analytics';import {setAudioOnly,setReceiveVideoQuality,@@ -214,7 +214,7 @@ class VideoQualityDialog extends Component {* @returns {void}*/_enableAudioOnly() {- sendEvent('toolbar.audioonly.enabled');+ sendAnalyticsEvent('toolbar.audioonly.enabled');logger.log('Video quality: audio only enabled');this.props.dispatch(setAudioOnly(true));}@@ -227,7 +227,7 @@ class VideoQualityDialog extends Component {* @returns {void}*/_enableHighDefinition() {- sendEvent('toolbar.videoquality.high');+ sendAnalyticsEvent('toolbar.videoquality.high');logger.log('Video quality: high enabled');this.props.dispatch(setReceiveVideoQuality(HIGH));}@@ -240,7 +240,7 @@ class VideoQualityDialog extends Component {* @returns {void}*/_enableLowDefinition() {- sendEvent('toolbar.videoquality.low');+ sendAnalyticsEvent('toolbar.videoquality.low');logger.log('Video quality: low enabled');this.props.dispatch(setReceiveVideoQuality(LOW));}@@ -253,7 +253,7 @@ class VideoQualityDialog extends Component {* @returns {void}*/_enableStandardDefinition() {- sendEvent('toolbar.videoquality.standard');+ sendAnalyticsEvent('toolbar.videoquality.standard');logger.log('Video quality: standard enabled');this.props.dispatch(setReceiveVideoQuality(STANDARD));}