ref(analytics): centralize all event names (#2272)

* ref(analytics): centralize all event names

* squash: fix typo and alpha ordering

* squash: rename file to AnalyticsEvents to parallel lib-jitsi-meet
This commit is contained in:
virtuacoplenny
2017-12-11 10:48:32 -08:00
committed by bgrozev
parent ee1ec42463
commit 9b67e796bd
26 changed files with 899 additions and 111 deletions

View File

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