feat(recording): Add analytics event and logging.

pull/3381/head
hristoterezov 6 years ago committed by yanas
parent df0e107ea6
commit 62544188bd
  1. 10
      react/features/recording/components/Recording/StartRecordingDialogContent.web.js
  2. 8
      react/features/recording/functions.js

@ -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());
}
}

@ -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;
});
}

Loading…
Cancel
Save