Przeglądaj źródła

feat(recording): Add analytics event and logging.

j8
hristoterezov 6 lat temu
rodzic
commit
62544188bd

+ 10
- 0
react/features/recording/components/Recording/StartRecordingDialogContent.web.js Wyświetl plik

4
 import React, { Component } from 'react';
4
 import React, { Component } from 'react';
5
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
6
 
6
 
7
+import {
8
+    createRecordingDialogEvent,
9
+    sendAnalytics
10
+} from '../../../analytics';
7
 import { translate } from '../../../base/i18n';
11
 import { translate } from '../../../base/i18n';
8
 import { authorizeDropbox, updateDropboxToken } from '../../../base/oauth';
12
 import { authorizeDropbox, updateDropboxToken } from '../../../base/oauth';
9
 
13
 
161
      * @returns {void}
165
      * @returns {void}
162
      */
166
      */
163
     _onSignInClick() {
167
     _onSignInClick() {
168
+        sendAnalytics(
169
+            createRecordingDialogEvent('start', 'signIn.button')
170
+        );
164
         this.props.dispatch(authorizeDropbox());
171
         this.props.dispatch(authorizeDropbox());
165
     }
172
     }
166
 
173
 
172
      * @returns {void}
179
      * @returns {void}
173
      */
180
      */
174
     _onSignOutClick() {
181
     _onSignOutClick() {
182
+        sendAnalytics(
183
+            createRecordingDialogEvent('start', 'signOut.button')
184
+        );
175
         this.props.dispatch(updateDropboxToken());
185
         this.props.dispatch(updateDropboxToken());
176
     }
186
     }
177
 }
187
 }

+ 7
- 1
react/features/recording/functions.js Wyświetl plik

4
 
4
 
5
 import { JitsiRecordingConstants } from '../base/lib-jitsi-meet';
5
 import { JitsiRecordingConstants } from '../base/lib-jitsi-meet';
6
 
6
 
7
+const logger = require('jitsi-meet-logger').getLogger(__filename);
8
+
7
 /**
9
 /**
8
  * Searches in the passed in redux state for an active recording session of the
10
  * Searches in the passed in redux state for an active recording session of the
9
  * passed in mode.
11
  * passed in mode.
61
             spaceLeft: Math.floor((allocated - used) / 1048576)// 1MiB=1048576B
63
             spaceLeft: Math.floor((allocated - used) / 1048576)// 1MiB=1048576B
62
         };
64
         };
63
 
65
 
64
-    }, () => undefined);
66
+    }, error => {
67
+        logger.error(error);
68
+
69
+        return undefined;
70
+    });
65
 }
71
 }

Ładowanie…
Anuluj
Zapisz