style(analytics): sendEvent -> sendAnalyticsEvent

This commit is contained in:
hristoterezov 2017-10-16 14:58:38 -05:00 committed by yanas
parent 5e01abf6fb
commit 0b50578de9
23 changed files with 109 additions and 105 deletions

View File

@ -15,7 +15,7 @@ import UIEvents from './service/UI/UIEvents';
import UIUtil from './modules/UI/util/UIUtil'; import UIUtil from './modules/UI/util/UIUtil';
import * as JitsiMeetConferenceEvents from './ConferenceEvents'; import * as JitsiMeetConferenceEvents from './ConferenceEvents';
import { initAnalytics, sendEvent } from './react/features/analytics'; import { initAnalytics, sendAnalyticsEvent } from './react/features/analytics';
import EventEmitter from 'events'; import EventEmitter from 'events';
@ -719,12 +719,12 @@ export default {
.then(([ tracks, con ]) => { .then(([ tracks, con ]) => {
tracks.forEach(track => { tracks.forEach(track => {
if (track.isAudioTrack() && this.isLocalAudioMuted()) { if (track.isAudioTrack() && this.isLocalAudioMuted()) {
sendEvent('conference.audio.initiallyMuted'); sendAnalyticsEvent('conference.audio.initiallyMuted');
logger.log('Audio mute: initially muted'); logger.log('Audio mute: initially muted');
track.mute(); track.mute();
} else if (track.isVideoTrack() } else if (track.isVideoTrack()
&& this.isLocalVideoMuted()) { && this.isLocalVideoMuted()) {
sendEvent('conference.video.initiallyMuted'); sendAnalyticsEvent('conference.video.initiallyMuted');
logger.log('Video mute: initially muted'); logger.log('Video mute: initially muted');
track.mute(); track.mute();
} }
@ -1423,7 +1423,7 @@ export default {
promise = createLocalTracksF({ devices: [ 'video' ] }) promise = createLocalTracksF({ devices: [ 'video' ] })
.then(([ stream ]) => this.useVideoStream(stream)) .then(([ stream ]) => this.useVideoStream(stream))
.then(() => { .then(() => {
sendEvent( sendAnalyticsEvent(
'conference.sharingDesktop.stop'); 'conference.sharingDesktop.stop');
logger.log('switched back to local video'); logger.log('switched back to local video');
if (!this.localVideo && wasVideoMuted) { if (!this.localVideo && wasVideoMuted) {
@ -1603,7 +1603,7 @@ export default {
.then(stream => this.useVideoStream(stream)) .then(stream => this.useVideoStream(stream))
.then(() => { .then(() => {
this.videoSwitchInProgress = false; this.videoSwitchInProgress = false;
sendEvent('conference.sharingDesktop.start'); sendAnalyticsEvent('conference.sharingDesktop.start');
logger.log('sharing local desktop'); logger.log('sharing local desktop');
}) })
.catch(error => { .catch(error => {
@ -1896,7 +1896,7 @@ export default {
room.selectParticipant(id); room.selectParticipant(id);
} catch (e) { } catch (e) {
sendEvent( sendAnalyticsEvent(
'selectParticipant.failed'); 'selectParticipant.failed');
reportError(e); reportError(e);
} }
@ -2138,7 +2138,7 @@ export default {
// Longer delays will be caused by something else and will just // Longer delays will be caused by something else and will just
// poison the data. // poison the data.
if (delay < 2000) { if (delay < 2000) {
sendEvent('stream.switch.delay', { value: delay }); sendAnalyticsEvent('stream.switch.delay', { value: delay });
} }
}); });
@ -2171,7 +2171,7 @@ export default {
APP.UI.addListener( APP.UI.addListener(
UIEvents.VIDEO_DEVICE_CHANGED, UIEvents.VIDEO_DEVICE_CHANGED,
cameraDeviceId => { cameraDeviceId => {
sendEvent('settings.changeDevice.video'); sendAnalyticsEvent('settings.changeDevice.video');
createLocalTracksF({ createLocalTracksF({
devices: [ 'video' ], devices: [ 'video' ],
cameraDeviceId, cameraDeviceId,
@ -2199,7 +2199,7 @@ export default {
APP.UI.addListener( APP.UI.addListener(
UIEvents.AUDIO_DEVICE_CHANGED, UIEvents.AUDIO_DEVICE_CHANGED,
micDeviceId => { micDeviceId => {
sendEvent( sendAnalyticsEvent(
'settings.changeDevice.audioIn'); 'settings.changeDevice.audioIn');
createLocalTracksF({ createLocalTracksF({
devices: [ 'audio' ], devices: [ 'audio' ],
@ -2220,7 +2220,7 @@ export default {
APP.UI.addListener( APP.UI.addListener(
UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED, UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
audioOutputDeviceId => { audioOutputDeviceId => {
sendEvent( sendAnalyticsEvent(
'settings.changeDevice.audioOut'); 'settings.changeDevice.audioOut');
APP.settings.setAudioOutputDeviceId(audioOutputDeviceId) APP.settings.setAudioOutputDeviceId(audioOutputDeviceId)
.then(() => logger.log('changed audio output device')) .then(() => logger.log('changed audio output device'))
@ -2428,7 +2428,7 @@ export default {
if (audioWasMuted if (audioWasMuted
|| currentDevices.audioinput.length || currentDevices.audioinput.length
> availableAudioInputDevices.length) { > availableAudioInputDevices.length) {
sendEvent('deviceListChanged.audio.muted'); sendAnalyticsEvent('deviceListChanged.audio.muted');
logger.log('Audio mute: device list changed'); logger.log('Audio mute: device list changed');
muteLocalAudio(true); muteLocalAudio(true);
} }
@ -2439,7 +2439,7 @@ export default {
&& (videoWasMuted && (videoWasMuted
|| currentDevices.videoinput.length || currentDevices.videoinput.length
> availableVideoInputDevices.length)) { > availableVideoInputDevices.length)) {
sendEvent('deviceListChanged.video.muted'); sendAnalyticsEvent('deviceListChanged.video.muted');
logger.log('Video mute: device list changed'); logger.log('Video mute: device list changed');
muteLocalVideo(true); muteLocalVideo(true);
} }
@ -2535,7 +2535,7 @@ export default {
* NOTE: Should be used after conference.init * NOTE: Should be used after conference.init
*/ */
logEvent(name, value, label) { logEvent(name, value, label) {
sendEvent(name, { sendAnalyticsEvent(name, {
value, value,
label label
}); });

View File

@ -2,7 +2,7 @@
import * as JitsiMeetConferenceEvents from '../../ConferenceEvents'; import * as JitsiMeetConferenceEvents from '../../ConferenceEvents';
import { parseJWTFromURLParams } from '../../react/features/base/jwt'; import { parseJWTFromURLParams } from '../../react/features/base/jwt';
import { sendEvent } from '../../react/features/analytics'; import { sendAnalyticsEvent } from '../../react/features/analytics';
import { getJitsiMeetTransport } from '../transport'; import { getJitsiMeetTransport } from '../transport';
import { API_ID } from './constants'; import { API_ID } from './constants';
@ -55,12 +55,12 @@ function initCommands() {
'display-name': 'display-name':
APP.conference.changeLocalDisplayName.bind(APP.conference), APP.conference.changeLocalDisplayName.bind(APP.conference),
'toggle-audio': () => { 'toggle-audio': () => {
sendEvent('api.toggle.audio'); sendAnalyticsEvent('api.toggle.audio');
logger.log('Audio toggle: API command received'); logger.log('Audio toggle: API command received');
APP.conference.toggleAudioMuted(false /* no UI */); APP.conference.toggleAudioMuted(false /* no UI */);
}, },
'toggle-video': () => { 'toggle-video': () => {
sendEvent('api.toggle.video'); sendAnalyticsEvent('api.toggle.video');
logger.log('Video toggle: API command received'); logger.log('Video toggle: API command received');
APP.conference.toggleVideoMuted(false /* no UI */); APP.conference.toggleVideoMuted(false /* no UI */);
}, },

View File

@ -24,7 +24,7 @@ import {
JitsiRecordingStatus JitsiRecordingStatus
} from '../../../react/features/base/lib-jitsi-meet'; } from '../../../react/features/base/lib-jitsi-meet';
import { import {
sendEvent sendAnalyticsEvent
} from '../../../react/features/analytics'; } from '../../../react/features/analytics';
import { setToolboxEnabled } from '../../../react/features/toolbox'; import { setToolboxEnabled } from '../../../react/features/toolbox';
import { setNotificationsEnabled } from '../../../react/features/notifications'; import { setNotificationsEnabled } from '../../../react/features/notifications';
@ -456,7 +456,7 @@ const Recording = {
return; return;
} }
sendEvent('recording.clicked'); sendAnalyticsEvent('recording.clicked');
switch (this.currentState) { switch (this.currentState) {
case JitsiRecordingStatus.ON: case JitsiRecordingStatus.ON:
case JitsiRecordingStatus.RETRYING: case JitsiRecordingStatus.RETRYING:
@ -464,7 +464,7 @@ const Recording = {
_showStopRecordingPrompt(this.recordingType).then( _showStopRecordingPrompt(this.recordingType).then(
() => { () => {
this.eventEmitter.emit(UIEvents.RECORDING_TOGGLED); this.eventEmitter.emit(UIEvents.RECORDING_TOGGLED);
sendEvent('recording.stopped'); sendAnalyticsEvent('recording.stopped');
}, },
() => {}); // eslint-disable-line no-empty-function () => {}); // eslint-disable-line no-empty-function
break; break;
@ -477,11 +477,11 @@ const Recording = {
this.eventEmitter.emit( this.eventEmitter.emit(
UIEvents.RECORDING_TOGGLED, UIEvents.RECORDING_TOGGLED,
{ streamId }); { streamId });
sendEvent('recording.started'); sendAnalyticsEvent('recording.started');
}) })
.catch(reason => { .catch(reason => {
if (reason === APP.UI.messageHandler.CANCEL) { if (reason === APP.UI.messageHandler.CANCEL) {
sendEvent('recording.canceled'); sendAnalyticsEvent('recording.canceled');
} else { } else {
logger.error(reason); logger.error(reason);
} }
@ -491,7 +491,7 @@ const Recording = {
this.eventEmitter.emit( this.eventEmitter.emit(
UIEvents.RECORDING_TOGGLED, UIEvents.RECORDING_TOGGLED,
{ token: this.predefinedToken }); { token: this.predefinedToken });
sendEvent('recording.started'); sendAnalyticsEvent('recording.started');
return; return;
} }
@ -500,11 +500,11 @@ const Recording = {
this.eventEmitter.emit( this.eventEmitter.emit(
UIEvents.RECORDING_TOGGLED, UIEvents.RECORDING_TOGGLED,
{ token }); { token });
sendEvent('recording.started'); sendAnalyticsEvent('recording.started');
}) })
.catch(reason => { .catch(reason => {
if (reason === APP.UI.messageHandler.CANCEL) { if (reason === APP.UI.messageHandler.CANCEL) {
sendEvent('recording.canceled'); sendAnalyticsEvent('recording.canceled');
} else { } else {
logger.error(reason); logger.error(reason);
} }

View File

@ -8,7 +8,7 @@ import VideoLayout from '../videolayout/VideoLayout';
import LargeContainer from '../videolayout/LargeContainer'; import LargeContainer from '../videolayout/LargeContainer';
import Filmstrip from '../videolayout/Filmstrip'; import Filmstrip from '../videolayout/Filmstrip';
import { sendEvent } from '../../../react/features/analytics'; import { sendAnalyticsEvent } from '../../../react/features/analytics';
import { import {
participantJoined, participantJoined,
participantLeft participantLeft
@ -83,11 +83,11 @@ export default class SharedVideoManager {
url => { url => {
this.emitter.emit( this.emitter.emit(
UIEvents.UPDATE_SHARED_VIDEO, url, 'start'); UIEvents.UPDATE_SHARED_VIDEO, url, 'start');
sendEvent('sharedvideo.started'); sendAnalyticsEvent('sharedvideo.started');
}, },
err => { err => {
logger.log('SHARED VIDEO CANCELED', err); logger.log('SHARED VIDEO CANCELED', err);
sendEvent('sharedvideo.canceled'); sendAnalyticsEvent('sharedvideo.canceled');
} }
); );
@ -107,7 +107,7 @@ export default class SharedVideoManager {
} }
this.emitter.emit( this.emitter.emit(
UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop'); UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop');
sendEvent('sharedvideo.stoped'); sendAnalyticsEvent('sharedvideo.stoped');
}, },
() => {}); // eslint-disable-line no-empty-function () => {}); // eslint-disable-line no-empty-function
} else { } else {
@ -119,7 +119,7 @@ export default class SharedVideoManager {
dialog = null; dialog = null;
} }
); );
sendEvent('sharedvideo.alreadyshared'); sendAnalyticsEvent('sharedvideo.alreadyshared');
} }
} }
@ -228,7 +228,7 @@ export default class SharedVideoManager {
// eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq
} else if (event.data == YT.PlayerState.PAUSED) { } else if (event.data == YT.PlayerState.PAUSED) {
self.smartAudioUnmute(); self.smartAudioUnmute();
sendEvent('sharedvideo.paused'); sendAnalyticsEvent('sharedvideo.paused');
} }
// eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq
self.fireSharedVideoEvent(event.data == YT.PlayerState.PAUSED); self.fireSharedVideoEvent(event.data == YT.PlayerState.PAUSED);
@ -260,7 +260,7 @@ export default class SharedVideoManager {
} else if (event.data.volume <= 0 || event.data.muted) { } else if (event.data.volume <= 0 || event.data.muted) {
self.smartAudioUnmute(); self.smartAudioUnmute();
} }
sendEvent('sharedvideo.volumechanged'); sendAnalyticsEvent('sharedvideo.volumechanged');
}; };
window.onPlayerReady = function(event) { window.onPlayerReady = function(event) {
@ -566,7 +566,7 @@ export default class SharedVideoManager {
if (APP.conference.isLocalAudioMuted() if (APP.conference.isLocalAudioMuted()
&& !this.mutedWithUserInteraction && !this.mutedWithUserInteraction
&& !this.isSharedVideoVolumeOn()) { && !this.isSharedVideoVolumeOn()) {
sendEvent('sharedvideo.audio.unmuted'); sendAnalyticsEvent('sharedvideo.audio.unmuted');
logger.log('Shared video: audio unmuted'); logger.log('Shared video: audio unmuted');
this.emitter.emit(UIEvents.AUDIO_MUTED, false, false); this.emitter.emit(UIEvents.AUDIO_MUTED, false, false);
this.showMicMutedPopup(false); this.showMicMutedPopup(false);
@ -580,7 +580,7 @@ export default class SharedVideoManager {
smartAudioMute() { smartAudioMute() {
if (!APP.conference.isLocalAudioMuted() if (!APP.conference.isLocalAudioMuted()
&& this.isSharedVideoVolumeOn()) { && this.isSharedVideoVolumeOn()) {
sendEvent('sharedvideo.audio.muted'); sendAnalyticsEvent('sharedvideo.audio.muted');
logger.log('Shared video: audio muted'); logger.log('Shared video: audio muted');
this.emitter.emit(UIEvents.AUDIO_MUTED, true, false); this.emitter.emit(UIEvents.AUDIO_MUTED, true, false);
this.showMicMutedPopup(true); this.showMicMutedPopup(true);

View File

@ -3,7 +3,7 @@ import UIUtil from '../../util/UIUtil';
import UIEvents from '../../../../service/UI/UIEvents'; import UIEvents from '../../../../service/UI/UIEvents';
import Settings from '../../../settings/Settings'; import Settings from '../../../settings/Settings';
import { sendEvent } from '../../../../react/features/analytics'; import { sendAnalyticsEvent } from '../../../../react/features/analytics';
const sidePanelsContainerId = 'sideToolbarContainer'; const sidePanelsContainerId = 'sideToolbarContainer';
const htmlStr = ` const htmlStr = `
@ -91,7 +91,7 @@ export default {
* *
*/ */
function loginClicked() { function loginClicked() {
sendEvent('authenticate.login.clicked'); sendAnalyticsEvent('authenticate.login.clicked');
emitter.emit(UIEvents.AUTH_CLICKED); emitter.emit(UIEvents.AUTH_CLICKED);
} }
@ -104,7 +104,7 @@ export default {
const titleKey = 'dialog.logoutTitle'; const titleKey = 'dialog.logoutTitle';
const msgKey = 'dialog.logoutQuestion'; const msgKey = 'dialog.logoutQuestion';
sendEvent('authenticate.logout.clicked'); sendAnalyticsEvent('authenticate.logout.clicked');
// Ask for confirmation // Ask for confirmation
APP.UI.messageHandler.openTwoButtonDialog({ APP.UI.messageHandler.openTwoButtonDialog({

View File

@ -5,7 +5,7 @@ import { setFilmstripVisibility } from '../../../react/features/filmstrip';
import UIEvents from '../../../service/UI/UIEvents'; import UIEvents from '../../../service/UI/UIEvents';
import UIUtil from '../util/UIUtil'; import UIUtil from '../util/UIUtil';
import { sendEvent } from '../../../react/features/analytics'; import { sendAnalyticsEvent } from '../../../react/features/analytics';
const Filmstrip = { const Filmstrip = {
/** /**
@ -150,7 +150,7 @@ const Filmstrip = {
return; return;
} }
if (sendAnalytics) { if (sendAnalytics) {
sendEvent('toolbar.filmstrip.toggled'); sendAnalyticsEvent('toolbar.filmstrip.toggled');
} }
this.filmstrip.toggleClass('hidden'); this.filmstrip.toggleClass('hidden');

View File

@ -1,7 +1,7 @@
/* global APP, $, interfaceConfig */ /* global APP, $, interfaceConfig */
import { toggleDialog } from '../../react/features/base/dialog'; 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'; import { SpeakerStats } from '../../react/features/speaker-stats';
const logger = require('jitsi-meet-logger').getLogger(__filename); const logger = require('jitsi-meet-logger').getLogger(__filename);
@ -81,7 +81,7 @@ const KeyboardShortcut = {
|| $(':focus').is('textarea'))) { || $(':focus').is('textarea'))) {
if (this._getKeyboardKey(e).toUpperCase() === ' ') { if (this._getKeyboardKey(e).toUpperCase() === ' ') {
if (APP.conference.isLocalAudioMuted()) { if (APP.conference.isLocalAudioMuted()) {
sendEvent('shortcut.talk.released'); sendAnalyticsEvent('shortcut.talk.released');
logger.log('Talk shortcut released'); logger.log('Talk shortcut released');
APP.conference.muteAudio(false); APP.conference.muteAudio(false);
} }
@ -260,14 +260,14 @@ const KeyboardShortcut = {
}); });
this.registerShortcut('?', null, () => { this.registerShortcut('?', null, () => {
sendEvent('shortcut.shortcut.help'); sendAnalyticsEvent('shortcut.shortcut.help');
showKeyboardShortcutsPanel(true); showKeyboardShortcutsPanel(true);
}, 'keyboardShortcuts.toggleShortcuts'); }, 'keyboardShortcuts.toggleShortcuts');
// register SPACE shortcut in two steps to insure visibility of help // register SPACE shortcut in two steps to insure visibility of help
// message // message
this.registerShortcut(' ', null, () => { this.registerShortcut(' ', null, () => {
sendEvent('shortcut.talk.clicked'); sendAnalyticsEvent('shortcut.talk.clicked');
logger.log('Talk shortcut pressed'); logger.log('Talk shortcut pressed');
APP.conference.muteAudio(true); APP.conference.muteAudio(true);
}); });
@ -275,7 +275,7 @@ const KeyboardShortcut = {
if (!interfaceConfig.filmStripOnly) { if (!interfaceConfig.filmStripOnly) {
this.registerShortcut('T', null, () => { this.registerShortcut('T', null, () => {
sendEvent('shortcut.speakerStats.clicked'); sendAnalyticsEvent('shortcut.speakerStats.clicked');
APP.store.dispatch(toggleDialog(SpeakerStats, { APP.store.dispatch(toggleDialog(SpeakerStats, {
conference: APP.conference conference: APP.conference
})); }));

View File

@ -8,7 +8,7 @@ import { getJitsiMeetGlobalNS, loadScript } from '../base/util';
const logger = require('jitsi-meet-logger').getLogger(__filename); 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 setting * Loads the analytics scripts and inits JitsiMeetJS.analytics by setting

View File

@ -1,6 +1,6 @@
// @flow // @flow
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { getName } from '../../app'; import { getName } from '../../app';
import { JitsiConferenceEvents } from '../lib-jitsi-meet'; import { JitsiConferenceEvents } from '../lib-jitsi-meet';
import { setAudioMuted, setVideoMuted } from '../media'; import { setAudioMuted, setVideoMuted } from '../media';
@ -78,9 +78,9 @@ function _addConferenceListeners(conference, dispatch) {
const audioMuted = Boolean(conference.startAudioMuted); const audioMuted = Boolean(conference.startAudioMuted);
const videoMuted = Boolean(conference.startVideoMuted); const videoMuted = Boolean(conference.startVideoMuted);
sendEvent( sendAnalyticsEvent(
`startmuted.server.audio.${audioMuted ? 'muted' : 'unmuted'}`); `startmuted.server.audio.${audioMuted ? 'muted' : 'unmuted'}`);
sendEvent( sendAnalyticsEvent(
`startmuted.server.video.${videoMuted ? 'muted' : 'unmuted'}`); `startmuted.server.video.${videoMuted ? 'muted' : 'unmuted'}`);
logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${ logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${
videoMuted ? 'video' : ''}`); videoMuted ? 'video' : ''}`);

View File

@ -2,7 +2,7 @@
import UIEvents from '../../../../service/UI/UIEvents'; import UIEvents from '../../../../service/UI/UIEvents';
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { CONNECTION_ESTABLISHED } from '../connection'; import { CONNECTION_ESTABLISHED } from '../connection';
import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../media'; import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../media';
import { import {
@ -124,7 +124,7 @@ function _conferenceFailedOrLeft({ dispatch, getState }, next, action) {
const result = next(action); const result = next(action);
if (getState()['features/base/conference'].audioOnly) { if (getState()['features/base/conference'].audioOnly) {
sendEvent('audioonly.disabled'); sendAnalyticsEvent('audioonly.disabled');
logger.log('Audio only disabled'); logger.log('Audio only disabled');
dispatch(setAudioOnly(false)); dispatch(setAudioOnly(false));
} }
@ -196,7 +196,7 @@ function _pinParticipant(store, next, action) {
videoType = 'remote'; videoType = 'remote';
} }
sendEvent( sendAnalyticsEvent(
`${actionName}.${videoType}`, `${actionName}.${videoType}`,
{ value: conference.getParticipantCount() }); { value: conference.getParticipantCount() });
} }

View File

@ -1,6 +1,6 @@
/* @flow */ /* @flow */
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { SET_ROOM, setAudioOnly } from '../conference'; import { SET_ROOM, setAudioOnly } from '../conference';
import { parseURLParams } from '../config'; import { parseURLParams } from '../config';
import { MiddlewareRegistry } from '../redux'; import { MiddlewareRegistry } from '../redux';
@ -85,8 +85,10 @@ function _setRoom({ dispatch, getState }, next, action) {
// Apply the config. // Apply the config.
sendEvent(`startmuted.client.audio.${audioMuted ? 'muted' : 'unmuted'}`); sendAnalyticsEvent(
sendEvent(`startmuted.client.video.${videoMuted ? 'muted' : 'unmuted'}`); `startmuted.client.audio.${audioMuted ? 'muted' : 'unmuted'}`);
sendAnalyticsEvent(
`startmuted.client.video.${videoMuted ? 'muted' : 'unmuted'}`);
logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${ logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${
videoMuted ? 'video' : ''}`); videoMuted ? 'video' : ''}`);
@ -110,7 +112,8 @@ function _setRoom({ dispatch, getState }, next, action) {
typeof audioOnly === 'undefined' && (audioOnly = config.startAudioOnly); typeof audioOnly === 'undefined' && (audioOnly = config.startAudioOnly);
audioOnly = Boolean(audioOnly); audioOnly = Boolean(audioOnly);
sendEvent(`startaudioonly.${audioOnly ? 'enabled' : 'disabled'}`); sendAnalyticsEvent(
`startaudioonly.${audioOnly ? 'enabled' : 'disabled'}`);
logger.log(`Start audio only set to ${audioOnly.toString()}`); logger.log(`Start audio only set to ${audioOnly.toString()}`);
dispatch(setAudioOnly(audioOnly)); dispatch(setAudioOnly(audioOnly));
} }
@ -136,7 +139,7 @@ function _syncTrackMutedState({ getState }, track) {
// not yet in redux state and JitsiTrackEvents.TRACK_MUTE_CHANGED may be // not yet in redux state and JitsiTrackEvents.TRACK_MUTE_CHANGED may be
// fired before track gets to state. // fired before track gets to state.
if (track.muted !== muted) { if (track.muted !== muted) {
sendEvent( sendAnalyticsEvent(
`synctrackstate.${track.mediaType}.${muted ? 'muted' : 'unmuted'}`); `synctrackstate.${track.mediaType}.${muted ? 'muted' : 'unmuted'}`);
logger.log(`Sync ${track.mediaType} track muted state to ${ logger.log(`Sync ${track.mediaType} track muted state to ${
muted ? 'muted' : 'unmuted'}`); muted ? 'muted' : 'unmuted'}`);

View File

@ -1,4 +1,4 @@
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { JitsiTrackErrors, JitsiTrackEvents } from '../lib-jitsi-meet'; import { JitsiTrackErrors, JitsiTrackEvents } from '../lib-jitsi-meet';
import { import {
CAMERA_FACING_MODE, CAMERA_FACING_MODE,
@ -159,7 +159,8 @@ export function replaceLocalTrack(oldTrack, newTrack, conference) {
: setAudioMuted; : setAudioMuted;
const isMuted = newTrack.isMuted(); const isMuted = newTrack.isMuted();
sendEvent(`replacetrack.${newTrack.getType()}.${ sendAnalyticsEvent(`replacetrack.${
newTrack.getType()}.${
isMuted ? 'muted' : 'unmuted'}`); isMuted ? 'muted' : 'unmuted'}`);
logger.log(`Replace ${newTrack.getType()} track - ${ logger.log(`Replace ${newTrack.getType()} track - ${
isMuted ? 'muted' : 'unmuted'}`); isMuted ? 'muted' : 'unmuted'}`);

View File

@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { Dialog } from '../../base/dialog'; import { Dialog } from '../../base/dialog';
import { translate } from '../../base/i18n'; import { translate } from '../../base/i18n';
@ -145,7 +145,7 @@ class FeedbackDialog extends Component {
* @inheritdoc * @inheritdoc
*/ */
componentDidMount() { componentDidMount() {
sendEvent('feedback.open'); sendAnalyticsEvent('feedback.open');
} }
/** /**

View File

@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { getInviteURL } from '../../base/connection'; import { getInviteURL } from '../../base/connection';
import { Dialog } from '../../base/dialog'; import { Dialog } from '../../base/dialog';
import { translate } from '../../base/i18n'; import { translate } from '../../base/i18n';
@ -51,7 +51,7 @@ class InviteDialog extends Component {
* @inheritdoc * @inheritdoc
*/ */
componentWillUnmount() { componentWillUnmount() {
sendEvent('toolbar.invite.close'); sendAnalyticsEvent('toolbar.invite.close');
} }
/** /**

View File

@ -1,6 +1,6 @@
/* @flow */ /* @flow */
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { setLastN } from '../../base/conference'; import { setLastN } from '../../base/conference';
import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../../base/media'; import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../../base/media';
@ -43,7 +43,7 @@ export function _setBackgroundVideoMuted(muted: boolean) {
audioOnly || dispatch(setLastN(muted ? 0 : undefined)); audioOnly || dispatch(setLastN(muted ? 0 : undefined));
sendEvent('callkit.background.video.muted'); sendAnalyticsEvent('callkit.background.video.muted');
dispatch(setVideoMuted(muted, VIDEO_MUTISM_AUTHORITY.BACKGROUND)); dispatch(setVideoMuted(muted, VIDEO_MUTISM_AUTHORITY.BACKGROUND));
}; };

View File

@ -3,7 +3,7 @@
import { NativeModules } from 'react-native'; import { NativeModules } from 'react-native';
import uuid from 'uuid'; import uuid from 'uuid';
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT, appNavigate } from '../../app'; import { APP_WILL_MOUNT, APP_WILL_UNMOUNT, appNavigate } from '../../app';
import { import {
CONFERENCE_FAILED, CONFERENCE_FAILED,
@ -271,7 +271,7 @@ function _onPerformSetMutedCallAction({ callUUID, muted: newValue }) {
if (oldValue !== newValue) { if (oldValue !== newValue) {
const value = Boolean(newValue); const value = Boolean(newValue);
sendEvent(`callkit.audio.${value ? 'muted' : 'unmuted'}`); sendAnalyticsEvent(`callkit.audio.${value ? 'muted' : 'unmuted'}`);
dispatch(setAudioMuted(value)); dispatch(setAudioMuted(value));
} }
} }

View File

@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { translate } from '../../base/i18n'; import { translate } from '../../base/i18n';
import { kickParticipant } from '../../base/participants'; import { kickParticipant } from '../../base/participants';
@ -83,7 +83,7 @@ class KickButton extends Component {
_onClick() { _onClick() {
const { dispatch, onClick, participantID } = this.props; const { dispatch, onClick, participantID } = this.props;
sendEvent( sendAnalyticsEvent(
'remotevideomenu.kick', 'remotevideomenu.kick',
{ {
value: 1, value: 1,

View File

@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { translate } from '../../base/i18n'; import { translate } from '../../base/i18n';
import { muteRemoteParticipant } from '../../base/participants'; import { muteRemoteParticipant } from '../../base/participants';
@ -97,7 +97,7 @@ class MuteButton extends Component {
_onClick() { _onClick() {
const { dispatch, onClick, participantID } = this.props; const { dispatch, onClick, participantID } = this.props;
sendEvent( sendAnalyticsEvent(
'remotevideomenu.mute.clicked', 'remotevideomenu.mute.clicked',
{ {
value: 1, value: 1,

View File

@ -1,7 +1,7 @@
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { translate } from '../../base/i18n'; import { translate } from '../../base/i18n';
import RemoteVideoMenuButton from './RemoteVideoMenuButton'; import RemoteVideoMenuButton from './RemoteVideoMenuButton';
@ -130,7 +130,7 @@ class RemoteControlButton extends Component {
} }
if (eventName) { if (eventName) {
sendEvent( sendAnalyticsEvent(
`remotevideomenu.remotecontrol.${eventName}`, `remotevideomenu.remotecontrol.${eventName}`,
{ {
value: 1, value: 1,

View File

@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { DEFAULT_AVATAR_RELATIVE_PATH } from '../../base/participants'; import { DEFAULT_AVATAR_RELATIVE_PATH } from '../../base/participants';
import UIEvents from '../../../../service/UI/UIEvents'; import UIEvents from '../../../../service/UI/UIEvents';
@ -102,7 +102,7 @@ class ProfileButton extends Component {
*/ */
_onClick() { _onClick() {
if (!this.props._unclickable) { if (!this.props._unclickable) {
sendEvent('toolbar.profile.toggled'); sendAnalyticsEvent('toolbar.profile.toggled');
APP.UI.emitEvent(UIEvents.TOGGLE_PROFILE); APP.UI.emitEvent(UIEvents.TOGGLE_PROFILE);
} }
} }

View File

@ -3,7 +3,7 @@ import React, { Component } from 'react';
import { View } from 'react-native'; import { View } from 'react-native';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { toggleAudioOnly } from '../../base/conference'; import { toggleAudioOnly } from '../../base/conference';
import { import {
MEDIA_TYPE, MEDIA_TYPE,
@ -177,7 +177,7 @@ class Toolbox extends Component {
_onToggleAudio() { _onToggleAudio() {
const mute = !this.props._audioMuted; 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 // 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 // to change reality by tapping on the respective button i.e. the user
@ -200,7 +200,7 @@ class Toolbox extends Component {
_onToggleVideo() { _onToggleVideo() {
const mute = !this.props._videoMuted; 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 // 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 // to change reality by tapping on the respective button i.e. the user

View File

@ -2,7 +2,7 @@
import React from 'react'; import React from 'react';
import { sendEvent } from '../analytics'; import { sendAnalyticsEvent } from '../analytics';
import { ParticipantCounter } from '../contact-list'; import { ParticipantCounter } from '../contact-list';
import { openDeviceSelectionDialog } from '../device-selection'; import { openDeviceSelectionDialog } from '../device-selection';
import { InfoDialogButton, openInviteDialog } from '../invite'; import { InfoDialogButton, openInviteDialog } from '../invite';
@ -42,9 +42,9 @@ export default function getDefaultButtons() {
const newVideoMutedState = !APP.conference.isLocalVideoMuted(); const newVideoMutedState = !APP.conference.isLocalVideoMuted();
if (newVideoMutedState) { if (newVideoMutedState) {
sendEvent('toolbar.video.enabled'); sendAnalyticsEvent('toolbar.video.enabled');
} else { } else {
sendEvent('toolbar.video.disabled'); sendAnalyticsEvent('toolbar.video.disabled');
} }
APP.UI.emitEvent(UIEvents.VIDEO_MUTED, newVideoMutedState); APP.UI.emitEvent(UIEvents.VIDEO_MUTED, newVideoMutedState);
}, },
@ -64,7 +64,7 @@ export default function getDefaultButtons() {
return; return;
} }
sendEvent('shortcut.videomute.toggled'); sendAnalyticsEvent('shortcut.videomute.toggled');
APP.conference.toggleVideoMuted(); APP.conference.toggleVideoMuted();
}, },
shortcutDescription: 'keyboardShortcuts.videoMute', shortcutDescription: 'keyboardShortcuts.videoMute',
@ -81,13 +81,13 @@ export default function getDefaultButtons() {
<span id = 'unreadMessages' /></span>, <span id = 'unreadMessages' /></span>,
id: 'toolbar_button_chat', id: 'toolbar_button_chat',
onClick() { onClick() {
sendEvent('toolbar.chat.toggled'); sendAnalyticsEvent('toolbar.chat.toggled');
APP.UI.emitEvent(UIEvents.TOGGLE_CHAT); APP.UI.emitEvent(UIEvents.TOGGLE_CHAT);
}, },
shortcut: 'C', shortcut: 'C',
shortcutAttr: 'toggleChatPopover', shortcutAttr: 'toggleChatPopover',
shortcutFunc() { shortcutFunc() {
sendEvent('shortcut.chat.toggled'); sendAnalyticsEvent('shortcut.chat.toggled');
APP.UI.toggleChat(); APP.UI.toggleChat();
}, },
shortcutDescription: 'keyboardShortcuts.toggleChat', shortcutDescription: 'keyboardShortcuts.toggleChat',
@ -104,7 +104,7 @@ export default function getDefaultButtons() {
enabled: true, enabled: true,
id: 'toolbar_contact_list', id: 'toolbar_contact_list',
onClick() { onClick() {
sendEvent( sendAnalyticsEvent(
'toolbar.contacts.toggled'); 'toolbar.contacts.toggled');
APP.UI.emitEvent(UIEvents.TOGGLE_CONTACT_LIST); APP.UI.emitEvent(UIEvents.TOGGLE_CONTACT_LIST);
}, },
@ -121,9 +121,9 @@ export default function getDefaultButtons() {
id: 'toolbar_button_desktopsharing', id: 'toolbar_button_desktopsharing',
onClick() { onClick() {
if (APP.conference.isSharingScreen) { if (APP.conference.isSharingScreen) {
sendEvent('toolbar.screen.disabled'); sendAnalyticsEvent('toolbar.screen.disabled');
} else { } else {
sendEvent('toolbar.screen.enabled'); sendAnalyticsEvent('toolbar.screen.enabled');
} }
APP.UI.emitEvent(UIEvents.TOGGLE_SCREENSHARING); APP.UI.emitEvent(UIEvents.TOGGLE_SCREENSHARING);
}, },
@ -137,7 +137,7 @@ export default function getDefaultButtons() {
shortcut: 'D', shortcut: 'D',
shortcutAttr: 'toggleDesktopSharingPopover', shortcutAttr: 'toggleDesktopSharingPopover',
shortcutFunc() { shortcutFunc() {
sendEvent('shortcut.screen.toggled'); sendAnalyticsEvent('shortcut.screen.toggled');
// eslint-disable-next-line no-empty-function // eslint-disable-next-line no-empty-function
APP.conference.toggleScreenSharing().catch(() => {}); APP.conference.toggleScreenSharing().catch(() => {});
@ -157,7 +157,7 @@ export default function getDefaultButtons() {
}, },
id: 'toolbar_button_fodeviceselection', id: 'toolbar_button_fodeviceselection',
onClick(dispatch: Function) { onClick(dispatch: Function) {
sendEvent( sendAnalyticsEvent(
'toolbar.fodeviceselection.toggled'); 'toolbar.fodeviceselection.toggled');
dispatch(openDeviceSelectionDialog()); dispatch(openDeviceSelectionDialog());
@ -177,7 +177,7 @@ export default function getDefaultButtons() {
hidden: true, hidden: true,
id: 'toolbar_button_dialpad', id: 'toolbar_button_dialpad',
onClick() { onClick() {
sendEvent('toolbar.sip.dialpad.clicked'); sendAnalyticsEvent('toolbar.sip.dialpad.clicked');
}, },
tooltipKey: 'toolbar.dialpad' tooltipKey: 'toolbar.dialpad'
}, },
@ -191,7 +191,7 @@ export default function getDefaultButtons() {
hidden: true, hidden: true,
id: 'toolbar_button_etherpad', id: 'toolbar_button_etherpad',
onClick() { onClick() {
sendEvent('toolbar.etherpad.clicked'); sendAnalyticsEvent('toolbar.etherpad.clicked');
APP.UI.emitEvent(UIEvents.ETHERPAD_CLICKED); APP.UI.emitEvent(UIEvents.ETHERPAD_CLICKED);
}, },
tooltipKey: 'toolbar.etherpad' tooltipKey: 'toolbar.etherpad'
@ -205,7 +205,7 @@ export default function getDefaultButtons() {
enabled: true, enabled: true,
id: 'toolbar_button_fullScreen', id: 'toolbar_button_fullScreen',
onClick() { onClick() {
sendEvent('toolbar.fullscreen.enabled'); sendAnalyticsEvent('toolbar.fullscreen.enabled');
APP.UI.emitEvent(UIEvents.TOGGLE_FULLSCREEN); APP.UI.emitEvent(UIEvents.TOGGLE_FULLSCREEN);
}, },
@ -213,7 +213,7 @@ export default function getDefaultButtons() {
shortcutAttr: 'toggleFullscreenPopover', shortcutAttr: 'toggleFullscreenPopover',
shortcutDescription: 'keyboardShortcuts.fullScreen', shortcutDescription: 'keyboardShortcuts.fullScreen',
shortcutFunc() { shortcutFunc() {
sendEvent('shortcut.fullscreen.toggled'); sendAnalyticsEvent('shortcut.fullscreen.toggled');
APP.UI.toggleFullScreen(); APP.UI.toggleFullScreen();
}, },
tooltipKey: 'toolbar.fullscreen' tooltipKey: 'toolbar.fullscreen'
@ -229,7 +229,7 @@ export default function getDefaultButtons() {
isDisplayed: () => true, isDisplayed: () => true,
id: 'toolbar_button_hangup', id: 'toolbar_button_hangup',
onClick() { onClick() {
sendEvent('toolbar.hangup'); sendAnalyticsEvent('toolbar.hangup');
APP.UI.emitEvent(UIEvents.HANGUP); APP.UI.emitEvent(UIEvents.HANGUP);
}, },
tooltipKey: 'toolbar.hangup' tooltipKey: 'toolbar.hangup'
@ -252,7 +252,7 @@ export default function getDefaultButtons() {
enabled: true, enabled: true,
id: 'toolbar_button_link', id: 'toolbar_button_link',
onClick(dispatch: Function) { onClick(dispatch: Function) {
sendEvent('toolbar.invite.clicked'); sendAnalyticsEvent('toolbar.invite.clicked');
dispatch(openInviteDialog()); dispatch(openInviteDialog());
}, },
@ -280,11 +280,11 @@ export default function getDefaultButtons() {
APP.UI.showCustomToolbarPopup( APP.UI.showCustomToolbarPopup(
'microphone', 'unableToUnmutePopup', true, 5000); 'microphone', 'unableToUnmutePopup', true, 5000);
} else { } else {
sendEvent('toolbar.audio.unmuted'); sendAnalyticsEvent('toolbar.audio.unmuted');
APP.UI.emitEvent(UIEvents.AUDIO_MUTED, false, true); APP.UI.emitEvent(UIEvents.AUDIO_MUTED, false, true);
} }
} else { } else {
sendEvent('toolbar.audio.muted'); sendAnalyticsEvent('toolbar.audio.muted');
APP.UI.emitEvent(UIEvents.AUDIO_MUTED, true, true); APP.UI.emitEvent(UIEvents.AUDIO_MUTED, true, true);
} }
}, },
@ -305,7 +305,7 @@ export default function getDefaultButtons() {
shortcut: 'M', shortcut: 'M',
shortcutAttr: 'mutePopover', shortcutAttr: 'mutePopover',
shortcutFunc() { shortcutFunc() {
sendEvent('shortcut.audiomute.toggled'); sendAnalyticsEvent('shortcut.audiomute.toggled');
APP.conference.toggleAudioMuted(); APP.conference.toggleAudioMuted();
}, },
shortcutDescription: 'keyboardShortcuts.mute', shortcutDescription: 'keyboardShortcuts.mute',
@ -328,14 +328,14 @@ export default function getDefaultButtons() {
enabled: true, enabled: true,
id: 'toolbar_button_raisehand', id: 'toolbar_button_raisehand',
onClick() { onClick() {
sendEvent('toolbar.raiseHand.clicked'); sendAnalyticsEvent('toolbar.raiseHand.clicked');
APP.conference.maybeToggleRaisedHand(); APP.conference.maybeToggleRaisedHand();
}, },
shortcut: 'R', shortcut: 'R',
shortcutAttr: 'raiseHandPopover', shortcutAttr: 'raiseHandPopover',
shortcutDescription: 'keyboardShortcuts.raiseHand', shortcutDescription: 'keyboardShortcuts.raiseHand',
shortcutFunc() { shortcutFunc() {
sendEvent('shortcut.raisehand.clicked'); sendAnalyticsEvent('shortcut.raisehand.clicked');
APP.conference.maybeToggleRaisedHand(); APP.conference.maybeToggleRaisedHand();
}, },
tooltipKey: 'toolbar.raiseHand' tooltipKey: 'toolbar.raiseHand'
@ -363,7 +363,7 @@ export default function getDefaultButtons() {
enabled: true, enabled: true,
id: 'toolbar_button_settings', id: 'toolbar_button_settings',
onClick() { onClick() {
sendEvent('toolbar.settings.toggled'); sendAnalyticsEvent('toolbar.settings.toggled');
APP.UI.emitEvent(UIEvents.TOGGLE_SETTINGS); APP.UI.emitEvent(UIEvents.TOGGLE_SETTINGS);
}, },
sideContainerId: 'settings_container', sideContainerId: 'settings_container',
@ -378,7 +378,7 @@ export default function getDefaultButtons() {
enabled: true, enabled: true,
id: 'toolbar_button_sharedvideo', id: 'toolbar_button_sharedvideo',
onClick() { onClick() {
sendEvent('toolbar.sharedvideo.clicked'); sendAnalyticsEvent('toolbar.sharedvideo.clicked');
APP.UI.emitEvent(UIEvents.SHARED_VIDEO_CLICKED); APP.UI.emitEvent(UIEvents.SHARED_VIDEO_CLICKED);
}, },
popups: [ popups: [

View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { sendEvent } from '../../analytics'; import { sendAnalyticsEvent } from '../../analytics';
import { import {
setAudioOnly, setAudioOnly,
setReceiveVideoQuality, setReceiveVideoQuality,
@ -214,7 +214,7 @@ class VideoQualityDialog extends Component {
* @returns {void} * @returns {void}
*/ */
_enableAudioOnly() { _enableAudioOnly() {
sendEvent('toolbar.audioonly.enabled'); sendAnalyticsEvent('toolbar.audioonly.enabled');
logger.log('Video quality: audio only enabled'); logger.log('Video quality: audio only enabled');
this.props.dispatch(setAudioOnly(true)); this.props.dispatch(setAudioOnly(true));
} }
@ -227,7 +227,7 @@ class VideoQualityDialog extends Component {
* @returns {void} * @returns {void}
*/ */
_enableHighDefinition() { _enableHighDefinition() {
sendEvent('toolbar.videoquality.high'); sendAnalyticsEvent('toolbar.videoquality.high');
logger.log('Video quality: high enabled'); logger.log('Video quality: high enabled');
this.props.dispatch(setReceiveVideoQuality(HIGH)); this.props.dispatch(setReceiveVideoQuality(HIGH));
} }
@ -240,7 +240,7 @@ class VideoQualityDialog extends Component {
* @returns {void} * @returns {void}
*/ */
_enableLowDefinition() { _enableLowDefinition() {
sendEvent('toolbar.videoquality.low'); sendAnalyticsEvent('toolbar.videoquality.low');
logger.log('Video quality: low enabled'); logger.log('Video quality: low enabled');
this.props.dispatch(setReceiveVideoQuality(LOW)); this.props.dispatch(setReceiveVideoQuality(LOW));
} }
@ -253,7 +253,7 @@ class VideoQualityDialog extends Component {
* @returns {void} * @returns {void}
*/ */
_enableStandardDefinition() { _enableStandardDefinition() {
sendEvent('toolbar.videoquality.standard'); sendAnalyticsEvent('toolbar.videoquality.standard');
logger.log('Video quality: standard enabled'); logger.log('Video quality: standard enabled');
this.props.dispatch(setReceiveVideoQuality(STANDARD)); this.props.dispatch(setReceiveVideoQuality(STANDARD));
} }