feat(mute): Add analytics and console logs for audio/video mutes

This commit is contained in:
hristoterezov
2017-10-13 09:50:48 -05:00
committed by yanas
parent df1437f018
commit 0eddef4d62
13 changed files with 111 additions and 15 deletions
+7
View File
@@ -2,10 +2,13 @@
import * as JitsiMeetConferenceEvents from '../../ConferenceEvents';
import { parseJWTFromURLParams } from '../../react/features/base/jwt';
import { sendEvent } from '../../react/features/analytics';
import { getJitsiMeetTransport } from '../transport';
import { API_ID } from './constants';
const logger = require('jitsi-meet-logger').getLogger(__filename);
declare var APP: Object;
/**
@@ -52,9 +55,13 @@ function initCommands() {
'display-name':
APP.conference.changeLocalDisplayName.bind(APP.conference),
'toggle-audio': () => {
sendEvent('api.toggle.audio');
logger.log('Audio toggle: API command received');
APP.conference.toggleAudioMuted(false /* no UI */);
},
'toggle-video': () => {
sendEvent('api.toggle.video');
logger.log('Video toggle: API command received');
APP.conference.toggleVideoMuted(false /* no UI */);
},
'toggle-film-strip': APP.UI.toggleFilmstrip,