feat(recording): Add analytics event and logging.

This commit is contained in:
hristoterezov 2018-08-10 14:32:10 -05:00 committed by yanas
parent df0e107ea6
commit 62544188bd
2 changed files with 17 additions and 1 deletions

View File

@ -4,6 +4,10 @@ import Spinner from '@atlaskit/spinner';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import {
createRecordingDialogEvent,
sendAnalytics
} from '../../../analytics';
import { translate } from '../../../base/i18n';
import { authorizeDropbox, updateDropboxToken } from '../../../base/oauth';
@ -161,6 +165,9 @@ class StartRecordingDialogContent extends Component<Props> {
* @returns {void}
*/
_onSignInClick() {
sendAnalytics(
createRecordingDialogEvent('start', 'signIn.button')
);
this.props.dispatch(authorizeDropbox());
}
@ -172,6 +179,9 @@ class StartRecordingDialogContent extends Component<Props> {
* @returns {void}
*/
_onSignOutClick() {
sendAnalytics(
createRecordingDialogEvent('start', 'signOut.button')
);
this.props.dispatch(updateDropboxToken());
}
}

View File

@ -4,6 +4,8 @@ import { Dropbox } from 'dropbox';
import { JitsiRecordingConstants } from '../base/lib-jitsi-meet';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/**
* Searches in the passed in redux state for an active recording session of the
* passed in mode.
@ -61,5 +63,9 @@ export function getDropboxData(
spaceLeft: Math.floor((allocated - used) / 1048576)// 1MiB=1048576B
};
}, () => undefined);
}, error => {
logger.error(error);
return undefined;
});
}