Kaynağa Gözat

Cleanup (#643)

* ref: Simplifies the logic for handling an incoming jingle session-initiate.

* fix: Don't redundantly log cross region

information under a field name called "label".

* cleanup: Simplifies code. Adds the userAgent as a permanent property

for statistics (so that the client doesn't have to).

* ref: Names the parameter which specifies the name of the event "eventName".

* ref: Extracts event names to AnalyticsEvents.

* ref: Exports and imports constants individually.

* fix: Fixes CONNECTION_TIMES event names.

* ref: Arranges constants alphabetically.

* ref: Adds line breaks.
dev1
bgrozev 7 yıl önce
ebeveyn
işleme
9b99e6bb33

+ 89
- 77
JitsiConference.js Dosyayı Görüntüle

@@ -1,6 +1,15 @@
1 1
 /* global __filename, $, Promise */
2 2
 import { Strophe } from 'strophe.js';
3 3
 
4
+import {
5
+    ICE_ESTABLISHMENT_DURATION_DIFF,
6
+    P2P_ESTABLISHED,
7
+    P2P_FAILED,
8
+    P2P_SWITCH_TO_JVB,
9
+    SESSION_INITIATE,
10
+    SESSION_RESTART,
11
+    SESSION_TERMINATE
12
+} from './service/statistics/AnalyticsEvents';
4 13
 import AvgRTPStatsReporter from './modules/statistics/AvgRTPStatsReporter';
5 14
 import ComponentsVersions from './modules/version/ComponentsVersions';
6 15
 import ConnectionQuality from './modules/connectivity/ConnectionQuality';
@@ -1362,7 +1371,52 @@ JitsiConference.prototype.onRemoteTrackRemoved = function(removedTrack) {
1362 1371
 };
1363 1372
 
1364 1373
 /**
1365
- * Handles incoming call event.
1374
+ * Handles an incoming call event for the P2P jingle session.
1375
+ */
1376
+JitsiConference.prototype._onIncomingCallP2P = function(
1377
+        jingleSession,
1378
+        jingleOffer) {
1379
+
1380
+    let rejectReason;
1381
+    const role = this.room.getMemberRole(jingleSession.remoteJid);
1382
+
1383
+    if (role !== 'moderator') {
1384
+        rejectReason = {
1385
+            reason: 'security-error',
1386
+            reasonDescription: 'Only focus can start new sessions',
1387
+            errorMsg: 'Rejecting session-initiate from non-focus and'
1388
+                        + `non-moderator user: ${jingleSession.remoteJid}`
1389
+        };
1390
+    } else if (!RTCBrowserType.isP2PSupported()) {
1391
+        rejectReason = {
1392
+            reason: 'unsupported-applications',
1393
+            reasonDescription: 'P2P not supported',
1394
+            errorMsg: 'This client does not support P2P connections'
1395
+        };
1396
+    } else if (!this.isP2PEnabled() && !this.isP2PTestModeEnabled()) {
1397
+        rejectReason = {
1398
+            reason: 'decline',
1399
+            reasonDescription: 'P2P disabled',
1400
+            errorMsg: 'P2P mode disabled in the configuration'
1401
+        };
1402
+    } else if (this.p2pJingleSession) {
1403
+        // Reject incoming P2P call (already in progress)
1404
+        rejectReason = {
1405
+            reason: 'busy',
1406
+            reasonDescription: 'P2P already in progress',
1407
+            errorMsg: 'Duplicated P2P "session-initiate"'
1408
+        };
1409
+    }
1410
+
1411
+    if (rejectReason) {
1412
+        this._rejectIncomingCall(jingleSession, rejectReason);
1413
+    } else {
1414
+        this._acceptP2PIncomingCall(jingleSession, jingleOffer);
1415
+    }
1416
+};
1417
+
1418
+/**
1419
+ * Handles an incoming call event.
1366 1420
  */
1367 1421
 JitsiConference.prototype.onIncomingCall = function(
1368 1422
         jingleSession,
@@ -1370,45 +1424,31 @@ JitsiConference.prototype.onIncomingCall = function(
1370 1424
         now) {
1371 1425
     // Handle incoming P2P call
1372 1426
     if (jingleSession.isP2P) {
1373
-        const role = this.room.getMemberRole(jingleSession.remoteJid);
1427
+        this._onIncomingCallP2P(jingleSession, jingleOffer);
1428
+    } else {
1429
+        if (!this.room.isFocus(jingleSession.remoteJid)) {
1430
+            const description = 'Rejecting session-initiate from non-focus.';
1374 1431
 
1375
-        if (role !== 'moderator') {
1376
-            // Reject incoming P2P call
1377
-            this._rejectIncomingCallNonModerator(jingleSession);
1378
-        } else if (!RTCBrowserType.isP2PSupported()) {
1379
-            // Reject incoming P2P call (already in progress)
1380 1432
             this._rejectIncomingCall(
1381 1433
                 jingleSession, {
1382
-                    reasonTag: 'unsupported-applications',
1383
-                    reasonMsg: 'P2P not supported',
1384
-                    errorMsg: 'This client does not support P2P connections'
1434
+                    reason: 'security-error',
1435
+                    reasonDescription: description,
1436
+                    errorMsg: description
1385 1437
                 });
1386
-        } else if (!this.isP2PEnabled() && !this.isP2PTestModeEnabled()) {
1387
-            this._rejectIncomingCall(
1388
-                jingleSession, {
1389
-                    reasonTag: 'decline',
1390
-                    reasonMsg: 'P2P disabled',
1391
-                    errorMsg: 'P2P mode disabled in the configuration'
1392
-                });
1393
-        } else if (this.p2pJingleSession) {
1394
-            // Reject incoming P2P call (already in progress)
1395
-            this._rejectIncomingCall(
1396
-                jingleSession, {
1397
-                    reasonTag: 'busy',
1398
-                    reasonMsg: 'P2P already in progress',
1399
-                    errorMsg: 'Duplicated P2P "session-initiate"'
1400
-                });
1401
-        } else {
1402
-            // Accept incoming P2P call
1403
-            this._acceptP2PIncomingCall(jingleSession, jingleOffer);
1404
-        }
1405
-
1406
-        return;
1407
-    } else if (!this.room.isFocus(jingleSession.remoteJid)) {
1408
-        this._rejectIncomingCall(jingleSession);
1409 1438
 
1410
-        return;
1439
+            return;
1440
+        }
1441
+        this._acceptJvbIncomingCall(jingleSession, jingleOffer, now);
1411 1442
     }
1443
+};
1444
+
1445
+/**
1446
+ * Accepts an incoming call event for the JVB jingle session.
1447
+ */
1448
+JitsiConference.prototype._acceptJvbIncomingCall = function(
1449
+        jingleSession,
1450
+        jingleOffer,
1451
+        now) {
1412 1452
 
1413 1453
     // Accept incoming call
1414 1454
     this.jvbJingleSession = jingleSession;
@@ -1416,21 +1456,13 @@ JitsiConference.prototype.onIncomingCall = function(
1416 1456
 
1417 1457
     // Log "session.restart"
1418 1458
     if (this.wasStopped) {
1419
-        Statistics.sendEventToAll('session.restart');
1459
+        Statistics.sendEventToAll(SESSION_RESTART);
1420 1460
     }
1421 1461
 
1422
-    // add info whether call is cross-region
1423
-    let crossRegion = null;
1424
-
1425
-    if (this.options.config && this.options.config.deploymentInfo
1426
-            && typeof this.options.config.deploymentInfo.crossRegion
1427
-            !== 'undefined') {
1428
-        crossRegion = this.options.config.deploymentInfo.crossRegion;
1429
-    }
1430 1462
     Statistics.analytics.sendEvent(
1431
-        'session.initiate', {
1432
-            value: now - this.room.connectionTimes['muc.joined'],
1433
-            label: crossRegion
1463
+        SESSION_INITIATE,
1464
+        {
1465
+            value: now - this.room.connectionTimes['muc.joined']
1434 1466
         });
1435 1467
     try {
1436 1468
         jingleSession.initialize(false /* initiator */, this.room, this.rtc);
@@ -1521,31 +1553,13 @@ JitsiConference.prototype._setBridgeChannel = function(offerIq, pc) {
1521 1553
     }
1522 1554
 };
1523 1555
 
1524
-/**
1525
- * Rejects incoming Jingle call with 'security-error'. Method should be used to
1526
- * reject calls initiated by unauthorised entities.
1527
- * @param {JingleSessionPC} jingleSession the session instance to be rejected.
1528
- * @private
1529
- */
1530
-JitsiConference.prototype._rejectIncomingCallNonModerator = function(
1531
-        jingleSession) {
1532
-    this._rejectIncomingCall(
1533
-        jingleSession,
1534
-        {
1535
-            reasonTag: 'security-error',
1536
-            reasonMsg: 'Only focus can start new sessions',
1537
-            errorMsg: 'Rejecting session-initiate from non-focus and'
1538
-                        + `non-moderator user: ${jingleSession.remoteJid}`
1539
-        });
1540
-};
1541
-
1542 1556
 /**
1543 1557
  * Rejects incoming Jingle call.
1544 1558
  * @param {JingleSessionPC} jingleSession the session instance to be rejected.
1545 1559
  * @param {object} [options]
1546
- * @param {string} options.reasonTag the name of the reason element as defined
1560
+ * @param {string} options.reason the name of the reason element as defined
1547 1561
  * by Jingle
1548
- * @param {string} options.reasonMsg the reason description which will
1562
+ * @param {string} options.reasonDescription the reason description which will
1549 1563
  * be included in Jingle 'session-terminate' message.
1550 1564
  * @param {string} options.errorMsg an error message to be logged on global
1551 1565
  * error handler
@@ -1558,7 +1572,7 @@ JitsiConference.prototype._rejectIncomingCall = function(
1558 1572
         GlobalOnErrorHandler.callErrorHandler(new Error(options.errorMsg));
1559 1573
     }
1560 1574
 
1561
-    // Terminate  the jingle session with a reason
1575
+    // Terminate the jingle session with a reason
1562 1576
     jingleSession.terminate(
1563 1577
         null /* success callback => we don't care */,
1564 1578
         error => {
@@ -1566,8 +1580,8 @@ JitsiConference.prototype._rejectIncomingCall = function(
1566 1580
                 'An error occurred while trying to terminate'
1567 1581
                     + ' invalid Jingle session', error);
1568 1582
         }, {
1569
-            reason: options && options.reasonTag,
1570
-            reasonDescription: options && options.reasonMsg,
1583
+            reason: options && options.reason,
1584
+            reasonDescription: options && options.reasonDescription,
1571 1585
             sendSessionTerminate: true
1572 1586
         });
1573 1587
 };
@@ -1590,8 +1604,7 @@ JitsiConference.prototype.onCallEnded = function(
1590 1604
     if (jingleSession === this.jvbJingleSession) {
1591 1605
         this.wasStopped = true;
1592 1606
 
1593
-        // Send session.terminate event
1594
-        Statistics.sendEventToAll('session.terminate');
1607
+        Statistics.sendEventToAll(SESSION_TERMINATE);
1595 1608
 
1596 1609
         // Stop the stats
1597 1610
         if (this.statistics) {
@@ -2078,7 +2091,7 @@ JitsiConference.prototype._onIceConnectionFailed = function(session) {
2078 2091
 
2079 2092
         // Log analytics event, but only for the initiator to not count it twice
2080 2093
         if (this.p2pJingleSession && this.p2pJingleSession.isInitiator) {
2081
-            Statistics.sendEventToAll('p2p.failed');
2094
+            Statistics.sendEventToAll(P2P_FAILED);
2082 2095
         }
2083 2096
         this._stopP2PSession('connectivity-error', 'ICE FAILED');
2084 2097
     }
@@ -2228,9 +2241,8 @@ JitsiConference.prototype._onIceConnectionEstablished = function(
2228 2241
             = this.p2pEstablishmentDuration - this.jvbEstablishmentDuration;
2229 2242
 
2230 2243
         Statistics.analytics.sendEvent(
2231
-            'ice.establishmentDurationDiff', {
2232
-                'value': establishmentDurationDiff
2233
-            });
2244
+            ICE_ESTABLISHMENT_DURATION_DIFF,
2245
+            { 'value': establishmentDurationDiff });
2234 2246
     }
2235 2247
 
2236 2248
     if (done) {
@@ -2262,7 +2274,7 @@ JitsiConference.prototype._onIceConnectionEstablished = function(
2262 2274
 
2263 2275
     // Log the P2P established event
2264 2276
     if (this.p2pJingleSession.isInitiator) {
2265
-        Statistics.sendEventToAll('p2p.established');
2277
+        Statistics.sendEventToAll(P2P_ESTABLISHED);
2266 2278
     }
2267 2279
 };
2268 2280
 
@@ -2531,7 +2543,7 @@ JitsiConference.prototype._maybeStartOrStopP2P = function(userLeftEvent) {
2531 2543
 
2532 2544
         // Log that there will be a switch back to the JVB connection
2533 2545
         if (this.p2pJingleSession.isInitiator && peerCount > 1) {
2534
-            Statistics.sendEventToAll('p2p.switch_to_jvb');
2546
+            Statistics.sendEventToAll(P2P_SWITCH_TO_JVB);
2535 2547
         }
2536 2548
         this._stopP2PSession();
2537 2549
     }

+ 23
- 10
JitsiConferenceEventManager.js Dosyayı Görüntüle

@@ -1,6 +1,16 @@
1 1
 /* global __filename */
2 2
 import { Strophe } from 'strophe.js';
3 3
 
4
+import {
5
+    _CONNECTION_TIMES_,
6
+    BRIDGE_DOWN,
7
+    CONFERENCE_ERROR_,
8
+    CONNECTION_INTERRUPTED,
9
+    CONNECTION_RESTORED,
10
+    DATA_CHANNEL_OPEN,
11
+    FOCUS_LEFT,
12
+    REMOTELY_MUTED
13
+} from './service/statistics/AnalyticsEvents';
4 14
 import AuthenticationEvents
5 15
     from './service/authentication/AuthenticationEvents';
6 16
 import EventEmitterForwarder from './modules/util/EventEmitterForwarder';
@@ -42,10 +52,12 @@ export default function JitsiConferenceEventManager(conference) {
42 52
         });
43 53
     conference.on(
44 54
         JitsiConferenceEvents.CONNECTION_INTERRUPTED,
45
-        Statistics.sendEventToAll.bind(Statistics, 'connection.interrupted'));
55
+        Statistics.sendEventToAll.bind(
56
+            Statistics, CONNECTION_INTERRUPTED));
46 57
     conference.on(
47 58
         JitsiConferenceEvents.CONNECTION_RESTORED,
48
-        Statistics.sendEventToAll.bind(Statistics, 'connection.restored'));
59
+        Statistics.sendEventToAll.bind(
60
+            Statistics, CONNECTION_RESTORED));
49 61
 }
50 62
 
51 63
 /**
@@ -73,7 +85,7 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function() {
73 85
 
74 86
     chatRoom.addListener(XMPPEvents.AUDIO_MUTED_BY_FOCUS,
75 87
         value => {
76
-            Statistics.analytics.sendEvent('conference.remotelyMuted');
88
+            Statistics.analytics.sendEvent(REMOTELY_MUTED);
77 89
 
78 90
             // set isMutedByFocus when setAudioMute Promise ends
79 91
             conference.rtc.setAudioMute(value).then(
@@ -99,13 +111,15 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function() {
99 111
 
100 112
             Object.keys(chatRoom.connectionTimes).forEach(key => {
101 113
                 const value = chatRoom.connectionTimes[key];
114
+                const eventName = `conference.${_CONNECTION_TIMES_}${key}`;
102 115
 
103
-                Statistics.analytics.sendEvent(`conference.${key}`, { value });
116
+                Statistics.analytics.sendEvent(eventName, { value });
104 117
             });
105 118
             Object.keys(chatRoom.xmpp.connectionTimes).forEach(key => {
106 119
                 const value = chatRoom.xmpp.connectionTimes[key];
120
+                const eventName = `xmpp.${_CONNECTION_TIMES_}${key}`;
107 121
 
108
-                Statistics.analytics.sendEvent(`xmpp.${key}`, { value });
122
+                Statistics.analytics.sendEvent(eventName, { value });
109 123
             });
110 124
         });
111 125
 
@@ -137,7 +151,7 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function() {
137 151
         JitsiConferenceErrors.VIDEOBRIDGE_NOT_AVAILABLE);
138 152
     chatRoom.addListener(
139 153
         XMPPEvents.BRIDGE_DOWN,
140
-        () => Statistics.analytics.sendEvent('conference.bridgeDown'));
154
+        () => Statistics.analytics.sendEvent(BRIDGE_DOWN));
141 155
 
142 156
     this.chatRoomForwarder.forward(XMPPEvents.RESERVATION_ERROR,
143 157
         JitsiConferenceEvents.CONFERENCE_FAILED,
@@ -175,14 +189,14 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function() {
175 189
 
176 190
     chatRoom.addListener(XMPPEvents.FOCUS_LEFT,
177 191
         () => {
178
-            Statistics.analytics.sendEvent('conference.focusLeft');
192
+            Statistics.analytics.sendEvent(FOCUS_LEFT);
179 193
             conference.eventEmitter.emit(
180 194
                 JitsiConferenceEvents.CONFERENCE_FAILED,
181 195
                 JitsiConferenceErrors.FOCUS_LEFT);
182 196
         });
183 197
 
184 198
     const eventLogHandler
185
-        = reason => Statistics.sendEventToAll(`conference.error.${reason}`);
199
+        = reason => Statistics.sendEventToAll(`${CONFERENCE_ERROR_}.${reason}`);
186 200
 
187 201
     chatRoom.addListener(XMPPEvents.SESSION_ACCEPT_TIMEOUT,
188 202
         jingleSession => {
@@ -458,8 +472,7 @@ JitsiConferenceEventManager.prototype.setupRTCListeners = function() {
458 472
 
459 473
         logger.log('(TIME) data channel opened ', now);
460 474
         conference.room.connectionTimes['data.channel.opened'] = now;
461
-        Statistics.analytics.sendEvent('conference.dataChannel.open',
462
-            { value: now });
475
+        Statistics.analytics.sendEvent(DATA_CHANNEL_OPEN, { value: now });
463 476
 
464 477
         conference.eventEmitter.emit(JitsiConferenceEvents.DATA_CHANNEL_OPENED);
465 478
     });

+ 8
- 4
JitsiConnection.js Dosyayı Görüntüle

@@ -1,10 +1,14 @@
1
+import {
2
+    CONNECTION_DISCONNECTED_,
3
+    CONNECTION_FAILED_
4
+} from './service/statistics/AnalyticsEvents';
1 5
 import JitsiConference from './JitsiConference';
2 6
 import * as JitsiConnectionEvents from './JitsiConnectionEvents';
3 7
 import Statistics from './modules/statistics/statistics';
4 8
 import XMPP from './modules/xmpp/xmpp';
5 9
 
6 10
 /**
7
- * Creates new connection object for the Jitsi Meet server side video
11
+ * Creates a new connection object for the Jitsi Meet server side video
8 12
  * conferencing service. Provides access to the JitsiConference interface.
9 13
  * @param appID identification for the provider of Jitsi Meet video conferencing
10 14
  * services.
@@ -21,8 +25,8 @@ export default function JitsiConnection(appID, token, options) {
21 25
 
22 26
     this.addEventListener(JitsiConnectionEvents.CONNECTION_FAILED,
23 27
         (errType, msg) => {
24
-            // sends analytics and callstats event
25
-            Statistics.sendEventToAll(`connection.failed.${errType}`,
28
+            Statistics.sendEventToAll(
29
+                `${CONNECTION_FAILED_}.${errType}`,
26 30
                 { label: msg });
27 31
         });
28 32
 
@@ -33,7 +37,7 @@ export default function JitsiConnection(appID, token, options) {
33 37
             // when there is real error
34 38
             if (msg) {
35 39
                 Statistics.analytics.sendEvent(
36
-                    `connection.disconnected.${msg}`);
40
+                    `${CONNECTION_DISCONNECTED_}.${msg}`);
37 41
             }
38 42
             Statistics.sendLog(
39 43
                 JSON.stringify({ id: 'connection.disconnected',

+ 19
- 10
JitsiMeetJS.js Dosyayı Görüntüle

@@ -1,5 +1,12 @@
1 1
 /* global __filename */
2 2
 
3
+import {
4
+    GET_USER_MEDIA_DEVICE_NOT_FOUND_,
5
+    GET_USER_MEDIA_FAIL_,
6
+    GET_USER_MEDIA_FAILED_,
7
+    GET_USER_MEDIA_SUCCESS_,
8
+    GET_USER_MEDIA_USER_CANCEL_
9
+} from './service/statistics/AnalyticsEvents';
3 10
 import AuthUtil from './modules/util/AuthUtil';
4 11
 import * as ConnectionQualityEvents
5 12
     from './service/connectivity/ConnectionQualityEvents';
@@ -275,8 +282,10 @@ export default {
275 282
                 window.connectionTimes['obtainPermissions.end']
276 283
                     = window.performance.now();
277 284
 
278
-                Statistics.analytics.sendEvent(addDeviceTypeToAnalyticsEvent(
279
-                    'getUserMedia.success', options), { value: options });
285
+                Statistics.analytics.sendEvent(
286
+                    addDeviceTypeToAnalyticsEvent(
287
+                        GET_USER_MEDIA_SUCCESS_, options),
288
+                    { value: options });
280 289
 
281 290
                 if (!RTC.options.disableAudioLevels) {
282 291
                     for (let i = 0; i < tracks.length; i++) {
@@ -325,7 +334,8 @@ export default {
325 334
                             newResolution);
326 335
 
327 336
                         Statistics.analytics.sendEvent(
328
-                            `getUserMedia.fail.resolution.${oldResolution}`);
337
+                            `${GET_USER_MEDIA_FAIL_}.resolution.${
338
+                                oldResolution}`);
329 339
 
330 340
                         return this.createLocalTracks(options);
331 341
                     }
@@ -343,7 +353,7 @@ export default {
343 353
 
344 354
                     Statistics.sendLog(JSON.stringify(logObject));
345 355
                     Statistics.analytics.sendEvent(
346
-                        'getUserMedia.userCancel.extensionInstall');
356
+                        `${GET_USER_MEDIA_USER_CANCEL_}.extensionInstall`);
347 357
                 } else if (JitsiTrackErrors.NOT_FOUND === error.name) {
348 358
                     // logs not found devices with just application log to cs
349 359
                     const logObject = {
@@ -353,18 +363,17 @@ export default {
353 363
 
354 364
                     Statistics.sendLog(JSON.stringify(logObject));
355 365
                     Statistics.analytics.sendEvent(
356
-                        `getUserMedia.deviceNotFound.${
366
+                        `${GET_USER_MEDIA_DEVICE_NOT_FOUND_}.${
357 367
                             error.gum.devices.join('.')}`);
358 368
                 } else {
359 369
                     // Report gUM failed to the stats
360 370
                     Statistics.sendGetUserMediaFailed(error);
361
-                    const event
371
+                    const eventName
362 372
                         = addDeviceTypeToAnalyticsEvent(
363
-                            'getUserMedia.failed',
364
-                            options);
373
+                            GET_USER_MEDIA_FAILED_, options);
365 374
 
366 375
                     Statistics.analytics.sendEvent(
367
-                        `${event}.${error.name}`,
376
+                        `${eventName}.${error.name}`,
368 377
                         { value: options });
369 378
                 }
370 379
 
@@ -376,7 +385,7 @@ export default {
376 385
     },
377 386
 
378 387
     /**
379
-     * Checks if its possible to enumerate available cameras/micropones.
388
+     * Checks if its possible to enumerate available cameras/microphones.
380 389
      * @returns {Promise<boolean>} a Promise which will be resolved only once
381 390
      * the WebRTC stack is ready, either with true if the device listing is
382 391
      * available available or with false otherwise.

+ 6
- 2
modules/RTC/JitsiLocalTrack.js Dosyayı Görüntüle

@@ -1,5 +1,9 @@
1 1
 /* global __filename, Promise */
2 2
 
3
+import {
4
+    _NO_DATA_FROM_SOURCE,
5
+    _TRACK_UNMUTE
6
+} from '../../service/statistics/AnalyticsEvents';
3 7
 import CameraFacingMode from '../../service/RTC/CameraFacingMode';
4 8
 import { getLogger } from 'jitsi-meet-logger';
5 9
 import JitsiTrack from './JitsiTrack';
@@ -193,7 +197,7 @@ export default class JitsiLocalTrack extends JitsiTrack {
193 197
                     this._setHandler('track_unmute', () => {
194 198
                         this._clearNoDataFromSourceMuteResources();
195 199
                         Statistics.sendEventToAll(
196
-                            `${this.getType()}.track_unmute`,
200
+                            `${this.getType()}.${_TRACK_UNMUTE}`,
197 201
                             { value: window.performance.now() - now });
198 202
                     });
199 203
                 }
@@ -231,7 +235,7 @@ export default class JitsiLocalTrack extends JitsiTrack {
231 235
      */
232 236
     _fireNoDataFromSourceEvent() {
233 237
         this.emit(NO_DATA_FROM_SOURCE);
234
-        const eventName = `${this.getType()}.no_data_from_source`;
238
+        const eventName = `${this.getType()}.${_NO_DATA_FROM_SOURCE}`;
235 239
 
236 240
         Statistics.analytics.sendEvent(eventName);
237 241
         const log = { name: eventName };

+ 2
- 1
modules/RTC/JitsiRemoteTrack.js Dosyayı Görüntüle

@@ -1,3 +1,4 @@
1
+import { _TTFM_ } from '../../service/statistics/AnalyticsEvents';
1 2
 import JitsiTrack from './JitsiTrack';
2 3
 import * as JitsiTrackEvents from '../../JitsiTrackEvents';
3 4
 import RTCBrowserType from './RTCBrowserType';
@@ -229,7 +230,7 @@ export default class JitsiRemoteTrack extends JitsiTrack {
229 230
 
230 231
         this.conference.getConnectionTimes()[`${type}.ttfm`] = ttfm;
231 232
         console.log(`(TIME) TTFM ${type}:\t`, ttfm);
232
-        let eventName = `${type}.ttfm`;
233
+        let eventName = `${type}.${_TTFM_}`;
233 234
 
234 235
         if (this.hasBeenMuted) {
235 236
             eventName += '.muted';

+ 2
- 4
modules/RTC/RTCUtils.js Dosyayı Görüntüle

@@ -9,6 +9,7 @@
9 9
           webkitRTCPeerConnection,
10 10
           webkitURL
11 11
 */
12
+import { DEVICE_LIST } from '../../service/statistics/AnalyticsEvents';
12 13
 import CameraFacingMode from '../../service/RTC/CameraFacingMode';
13 14
 import EventEmitter from 'events';
14 15
 import { getLogger } from 'jitsi-meet-logger';
@@ -558,10 +559,7 @@ function sendDeviceListToAnalytics(deviceList) {
558 559
                 };
559 560
             });
560 561
 
561
-    Statistics.analytics.sendEvent(
562
-        'devices.deviceList', {
563
-            devices: devicesPropsArray
564
-        });
562
+    Statistics.analytics.sendEvent(DEVICE_LIST, { devices: devicesPropsArray });
565 563
 }
566 564
 
567 565
 /**

+ 11
- 11
modules/statistics/AnalyticsAdapter.js Dosyayı Görüntüle

@@ -29,12 +29,12 @@ class CacheAnalytics extends AnalyticsAbstract {
29 29
 
30 30
     /**
31 31
      * Cache analytics event.
32
-     * @param {String} action the name of the event
32
+     * @param {String} eventName the name of the event
33 33
      * @param {Object} data can be any JSON object
34 34
      */
35
-    sendEvent(action, data = {}) {
35
+    sendEvent(eventName, data = {}) {
36 36
         this.eventCache.push({
37
-            action,
37
+            eventName,
38 38
             data
39 39
         });
40 40
     }
@@ -64,14 +64,15 @@ class AnalyticsAdapter {
64 64
      */
65 65
     constructor() {
66 66
         this.disposed = false;
67
-        this.browserName = RTCBrowserType.getBrowserName();
68 67
         this.analyticsHandlers = new Set();
69 68
 
70 69
         /**
71 70
          * Map of properties that will be added to every event
72 71
          */
73 72
         this.permanentProperties = {
74
-            callstatsname: Settings.callStatsUserName
73
+            callstatsname: Settings.callStatsUserName,
74
+            userAgent: navigator.userAgent,
75
+            browserName: RTCBrowserType.getBrowserName()
75 76
         };
76 77
 
77 78
         this.analyticsHandlers.add(cacheAnalytics);
@@ -79,17 +80,16 @@ class AnalyticsAdapter {
79 80
 
80 81
     /**
81 82
      * Sends analytics event.
82
-     * @param {String} action the name of the event
83
+     * @param {String} eventName the name of the event
83 84
      * @param {Object} data can be any JSON object
84 85
      */
85
-    sendEvent(action, data = {}) {
86
-        const modifiedData = Object.assign(
87
-            { browserName: this.browserName }, this.permanentProperties, data);
86
+    sendEvent(eventName, data = {}) {
87
+        const modifiedData = Object.assign({}, this.permanentProperties, data);
88 88
 
89 89
         this.analyticsHandlers.forEach(
90 90
             analytics =>
91 91
                 analytics.sendEvent(
92
-                    action,
92
+                    eventName,
93 93
                     analytics === cacheAnalytics ? data : modifiedData
94 94
                 )
95 95
         );
@@ -115,7 +115,7 @@ class AnalyticsAdapter {
115 115
         }
116 116
         this.analyticsHandlers = new Set(handlers);
117 117
         cacheAnalytics.drainCachedEvents().forEach(
118
-            ev => this.sendEvent(ev.action, ev.data));
118
+            ev => this.sendEvent(ev.eventName, ev.data));
119 119
     }
120 120
 
121 121
     /**

+ 3
- 39
modules/statistics/AvgRTPStatsReporter.js Dosyayı Görüntüle

@@ -1,5 +1,6 @@
1 1
 /* global __filename */
2 2
 
3
+import { AVG_RTP_STATS } from '../../service/statistics/AnalyticsEvents';
3 4
 import { getLogger } from 'jitsi-meet-logger';
4 5
 import * as ConnectionQualityEvents
5 6
     from '../../service/connectivity/ConnectionQualityEvents';
@@ -9,42 +10,6 @@ import RTCBrowserType from '../RTC/RTCBrowserType';
9 10
 import Statistics from './statistics';
10 11
 import * as VideoType from '../../service/RTC/VideoType';
11 12
 
12
-/**
13
- * All avg RTP stats are currently reported under 1 event name, but with
14
- * different properties that allows to distinguish between a P2P call, a call
15
- * relayed through TURN or the JVB, and multiparty vs 1:1. This constant stores
16
- * the name of this event. Example structure of "avg.rtp.stats" analytics event:
17
- *
18
- * {
19
- *   p2p: true,
20
- *   conferenceSize: 2,
21
- *   localCandidateType: "relay",
22
- *   remoteCandidateType: "relay",
23
- *   transportType: "udp",
24
- *
25
- *   "stat_avg_rtt": {
26
- *     value: 200,
27
- *     samples: [ 100, 200, 300 ]
28
- *   },
29
- *   "stat_avg_packetloss_total": {
30
- *     value: 10,
31
- *     samples: [ 5, 10, 15]
32
- *   }
33
- * }
34
- *
35
- * Note that the samples array is currently emitted for debug purposes only and
36
- * can be removed anytime soon from the structure.
37
- *
38
- * Also not all values are always present in "avg.rtp.stats", some of the values
39
- * are obtained and calculated as part of different process/event pipe. For
40
- * example {@link ConnectionAvgStats} instances are doing the reports for each
41
- * {@link TraceablePeerConnection} and work independently from the main stats
42
- * pipe.
43
- *
44
- * @type {string}
45
- */
46
-const AVG_RTP_STATS_EVENT = 'avg.rtp.stats';
47
-
48 13
 const logger = getLogger(__filename);
49 14
 
50 15
 /**
@@ -276,8 +241,7 @@ class ConnectionAvgStats {
276 241
                     }
277 242
                 }
278 243
 
279
-                Statistics.analytics.sendEvent(
280
-                    AVG_RTP_STATS_EVENT, batchReport);
244
+                Statistics.analytics.sendEvent(AVG_RTP_STATS, batchReport);
281 245
             }
282 246
 
283 247
             this._resetAvgStats();
@@ -755,7 +719,7 @@ export default class AvgRTPStatsReporter {
755 719
 
756 720
             this._avgCQ.appendReport(batchReport);
757 721
 
758
-            Statistics.analytics.sendEvent(AVG_RTP_STATS_EVENT, batchReport);
722
+            Statistics.analytics.sendEvent(AVG_RTP_STATS, batchReport);
759 723
 
760 724
             this._resetAvgStats();
761 725
         }

+ 18
- 7
modules/statistics/statistics.js Dosyayı Görüntüle

@@ -1,5 +1,9 @@
1 1
 import EventEmitter from 'events';
2 2
 
3
+import {
4
+    FEEDBACK,
5
+    ICE_FAILED
6
+} from '../../service/statistics/AnalyticsEvents';
3 7
 import analytics from './AnalyticsAdapter';
4 8
 import CallStats from './CallStats';
5 9
 import LocalStats from './LocalStatsCollector';
@@ -456,7 +460,7 @@ Statistics.prototype.sendConnectionResumeOrHoldEvent = function(tpc, isResume) {
456 460
 };
457 461
 
458 462
 /**
459
- * Notifies CallStats and analytics(if present) for ice connection failed
463
+ * Notifies CallStats and analytics (if present) for ice connection failed
460 464
  * @param {TraceablePeerConnection} tpc connection on which failure occurred.
461 465
  */
462 466
 Statistics.prototype.sendIceConnectionFailedEvent = function(tpc) {
@@ -465,7 +469,7 @@ Statistics.prototype.sendIceConnectionFailedEvent = function(tpc) {
465 469
     if (instance) {
466 470
         instance.sendIceConnectionFailedEvent();
467 471
     }
468
-    Statistics.analytics.sendEvent('connection.ice_failed');
472
+    Statistics.analytics.sendEvent(ICE_FAILED);
469 473
 };
470 474
 
471 475
 /**
@@ -679,9 +683,12 @@ Statistics.sendLog = function(m) {
679 683
  */
680 684
 Statistics.prototype.sendFeedback = function(overall, detailed) {
681 685
     CallStats.sendFeedback(this._getCallStatsConfID(), overall, detailed);
682
-    Statistics.analytics.sendEvent('feedback.rating',
683
-        { value: overall,
684
-            detailed });
686
+    Statistics.analytics.sendEvent(
687
+        FEEDBACK,
688
+        {
689
+            value: overall,
690
+            detailed
691
+        });
685 692
 };
686 693
 
687 694
 Statistics.LOCAL_JID = require('../../service/statistics/constants').LOCAL_JID;
@@ -706,6 +713,10 @@ Statistics.reportGlobalError = function(error) {
706 713
  */
707 714
 Statistics.sendEventToAll = function(eventName, data) {
708 715
     this.analytics.sendEvent(eventName, data);
709
-    Statistics.sendLog(JSON.stringify({ name: eventName,
710
-        data }));
716
+    Statistics.sendLog(
717
+        JSON.stringify(
718
+            {
719
+                name: eventName,
720
+                data
721
+            }));
711 722
 };

+ 15
- 7
modules/xmpp/JingleSessionPC.js Dosyayı Görüntüle

@@ -1,5 +1,11 @@
1 1
 /* global __filename, $ */
2 2
 
3
+import {
4
+    _ICE_CHECKING_DURATION,
5
+    _ICE_CONNECTION_STATE_,
6
+    _ICE_ESTABLISHMENT_DURATION,
7
+    _ICE_GATHERING_DURATION
8
+} from '../../service/statistics/AnalyticsEvents';
3 9
 import async from 'async';
4 10
 import { getLogger } from 'jitsi-meet-logger';
5 11
 import { $iq, Strophe } from 'strophe.js';
@@ -314,8 +320,8 @@ export default class JingleSessionPC extends JingleSession {
314 320
                 // End of gathering
315 321
                 let eventName = this.isP2P ? 'p2p.ice.' : 'ice.';
316 322
 
317
-                eventName += this.isInitiator ? 'initiator' : 'responder';
318
-                eventName += '.gatheringDuration';
323
+                eventName += this.isInitiator ? 'initiator.' : 'responder.';
324
+                eventName += _ICE_GATHERING_DURATION;
319 325
                 Statistics.analytics.sendEvent(
320 326
                     eventName,
321 327
                     { value: now - this._gatheringStartedTimestamp });
@@ -367,10 +373,12 @@ export default class JingleSessionPC extends JingleSession {
367 373
                 `(TIME) ICE ${this.peerconnection.iceConnectionState}`
368 374
                     + ` P2P? ${this.isP2P}:\t`,
369 375
                 now);
376
+            const iceConnectionEventName
377
+                = `${this.isP2P ? 'p2p.' : ''}${_ICE_CONNECTION_STATE_}.${
378
+                    this.peerconnection.iceConnectionState}`;
379
+
370 380
             Statistics.analytics.sendEvent(
371
-                `${this.isP2P ? 'p2p.ice.' : 'ice.'}`
372
-                    + `${this.peerconnection.iceConnectionState}`,
373
-                { value: now });
381
+                iceConnectionEventName, { value: now });
374 382
             this.room.eventEmitter.emit(
375 383
                 XMPPEvents.ICE_CONNECTION_STATE_CHANGED,
376 384
                 this,
@@ -394,7 +402,7 @@ export default class JingleSessionPC extends JingleSession {
394 402
 
395 403
                     eventName += this.isInitiator ? 'initiator.' : 'responder.';
396 404
                     Statistics.analytics.sendEvent(
397
-                        `${eventName}checksDuration`,
405
+                        `${eventName}${_ICE_CHECKING_DURATION}`,
398 406
                         {
399 407
                             value: now - this._iceCheckingStartedTimestamp
400 408
                         });
@@ -410,7 +418,7 @@ export default class JingleSessionPC extends JingleSession {
410 418
                     this.establishmentDuration = now - iceStarted;
411 419
 
412 420
                     Statistics.analytics.sendEvent(
413
-                        `${eventName}establishmentDuration`,
421
+                        `${eventName}${_ICE_ESTABLISHMENT_DURATION}`,
414 422
                         {
415 423
                             value: this.establishmentDuration
416 424
                         });

+ 8
- 3
modules/xmpp/strophe.jingle.js Dosyayı Görüntüle

@@ -1,5 +1,10 @@
1 1
 /* global $, __filename */
2 2
 
3
+import {
4
+    SESSION_INITIATE_RECEIVED,
5
+    TRANSPORT_REPLACE_START,
6
+    TRANSPORT_REPLACE_SUCCESS
7
+} from '../../service/statistics/AnalyticsEvents';
3 8
 import { getLogger } from 'jitsi-meet-logger';
4 9
 import { $iq, Strophe } from 'strophe.js';
5 10
 
@@ -170,7 +175,7 @@ class JingleConnectionPlugin extends ConnectionPlugin {
170 175
             this.eventEmitter.emit(XMPPEvents.CALL_INCOMING,
171 176
                 sess, $(iq).find('>jingle'), now);
172 177
             Statistics.analytics.sendEvent(
173
-                'xmpp.session-initiate', { value: now });
178
+                SESSION_INITIATE_RECEIVED, { value: now });
174 179
             break;
175 180
         }
176 181
         case 'session-accept': {
@@ -205,7 +210,7 @@ class JingleConnectionPlugin extends ConnectionPlugin {
205 210
         case 'transport-replace':
206 211
             logger.info('(TIME) Start transport replace', now);
207 212
             Statistics.analytics.sendEvent(
208
-                'xmpp.transport-replace.start',
213
+                TRANSPORT_REPLACE_START,
209 214
                 { value: now });
210 215
 
211 216
             sess.replaceTransport($(iq).find('>jingle'), () => {
@@ -213,7 +218,7 @@ class JingleConnectionPlugin extends ConnectionPlugin {
213 218
 
214 219
                 logger.info('(TIME) Transport replace success!', successTime);
215 220
                 Statistics.analytics.sendEvent(
216
-                    'xmpp.transport-replace.success',
221
+                    TRANSPORT_REPLACE_SUCCESS,
217 222
                     { value: successTime });
218 223
             }, error => {
219 224
                 GlobalOnErrorHandler.callErrorHandler(error);

+ 447
- 0
service/statistics/AnalyticsEvents.js Dosyayı Görüntüle

@@ -0,0 +1,447 @@
1
+/**
2
+ * Note that an event's own properties and its permanent properties are
3
+ * are merged in one object. Because of this an event should never use
4
+ * properties with names that are already used by permanent properties
5
+ * (unless the intention is to override a permanent property). Here is a
6
+ * (non-exhaustive) list of currently know permanent properties:
7
+ *
8
+ * abtestSuspendVideo
9
+ * browserName
10
+ * callstatsname
11
+ * crossRegion
12
+ * forceJvb121
13
+ * region
14
+ * roomName
15
+ * shard
16
+ * size
17
+ * userAgent
18
+ * userRegion
19
+ *
20
+ * The naming convention for the constants below uses "_" as a prefix or
21
+ * suffix to indicate that known usage of the constant prepends or appends
22
+ * a string to the name of the event.
23
+ */
24
+
25
+/**
26
+ * Properties: value
27
+ *
28
+ * TODO: document, reformat
29
+ *
30
+ * Full event names (uncertain):
31
+ * conference.muc.joined (???)
32
+ * conference.sharingDesktop.start (???)
33
+ * conference.sharingDesktop.stop (???)
34
+ * xmpp.attached (???)
35
+ * xmpp.attaching (???)
36
+ * xmpp.connected (???)
37
+ * xmpp.connecting (???)
38
+ * xmpp.session-initiate (???)
39
+ */
40
+export const _CONNECTION_TIMES_ = '';
41
+
42
+/**
43
+ * TODO: document, reformat (group together with other ICE events)
44
+ *
45
+ * Known full event names:
46
+ * ice.initiator.checksDuration
47
+ * ice.responder.checksDuration
48
+ * p2p.ice.initiator.checksDuration
49
+ * p2p.ice.responder.checksDuration
50
+ *
51
+ * Properties: value
52
+ */
53
+export const _ICE_CHECKING_DURATION = 'checksDuration';
54
+
55
+/**
56
+ * TODO: document, reformat
57
+ *
58
+ * Known full event names:
59
+ * ice.checking
60
+ * ice.closed
61
+ * ice.completed
62
+ * ice.connected
63
+ * ice.disconnected
64
+ * ice.failed
65
+ * p2p.ice.checking
66
+ * p2p.ice.closed
67
+ * p2p.ice.completed
68
+ * p2p.ice.connected
69
+ * p2p.ice.disconnected
70
+ * p2p.ice.failed
71
+ *
72
+ * Properties: value
73
+ */
74
+export const _ICE_CONNECTION_STATE_ = 'ice';
75
+
76
+/**
77
+ * TODO: document, reformat (group together with other ICE events)
78
+ *
79
+ * Known full event names:
80
+ * ice.initiator.establishmentDuration
81
+ * ice.responder.establishmentDuration
82
+ * p2p.ice.initiator.establishmentDuration
83
+ * p2p.ice.responder.establishmentDuration
84
+ *
85
+ * Properties: value
86
+ */
87
+export const _ICE_ESTABLISHMENT_DURATION = 'establishmentDuration';
88
+
89
+/**
90
+ * TODO: document, reformat
91
+ *
92
+ * Known full event names:
93
+ * ice.initiator.gatheringDuration
94
+ * ice.responder.gatheringDuration
95
+ * p2p.ice.initiator.gatheringDuration
96
+ * p2p.ice.responder.gatheringDuration
97
+ *
98
+ * Properties: value
99
+ */
100
+export const _ICE_GATHERING_DURATION = 'gatheringDuration';
101
+
102
+/**
103
+ * TODO: document, reformat
104
+ *
105
+ * Known full event names:
106
+ * audio.no_data_from_source
107
+ * video.no_data_from_source
108
+ */
109
+export const _NO_DATA_FROM_SOURCE = 'no_data_from_source';
110
+
111
+/**
112
+ * TODO: document, reformat
113
+ *
114
+ * Known full event names:
115
+ * audio.track_unmute
116
+ * video.track_unmute
117
+ */
118
+export const _TRACK_UNMUTE = 'track_unmute';
119
+
120
+/**
121
+ * TODO: document, reformat
122
+ *
123
+ * TTMF: Time To First Media
124
+ *
125
+ * Known full event names:
126
+ * audio.ttfm
127
+ * video.ttfm
128
+ * audio.ttfm.muted
129
+ * video.ttfm.muted
130
+ */
131
+export const _TTFM_ = 'ttfm';
132
+
133
+/**
134
+ * All average RTP stats are currently reported under 1 event name, but with
135
+ * different properties that allows to distinguish between a P2P call, a
136
+ * call relayed through TURN or the JVB, and multiparty vs 1:1.
137
+ * Example structure of an "avg.rtp.stats" analytics event:
138
+ *
139
+ * {
140
+     *   p2p: true,
141
+     *   conferenceSize: 2,
142
+     *   localCandidateType: "relay",
143
+     *   remoteCandidateType: "relay",
144
+     *   transportType: "udp",
145
+     *
146
+     *   "stat_avg_rtt": {
147
+     *     value: 200,
148
+     *     samples: [ 100, 200, 300 ]
149
+     *   },
150
+     *   "stat_avg_packetloss_total": {
151
+     *     value: 10,
152
+     *     samples: [ 5, 10, 15]
153
+     *   }
154
+     * }
155
+ *
156
+ * Note that the samples array is currently emitted for debug purposes only
157
+ * and can be removed anytime soon from the structure.
158
+ *
159
+ * Also not all values are always present in "avg.rtp.stats", some of the
160
+ * values are obtained and calculated as part of different process/event
161
+ * pipe. For example {@link ConnectionAvgStats} instances are doing the
162
+ * reports for each {@link TraceablePeerConnection} and work independently
163
+ * from the main stats pipe.
164
+ */
165
+export const AVG_RTP_STATS = 'avg.rtp.stats';
166
+
167
+/**
168
+ * Properties: none
169
+ *
170
+ * TODO: document, deprecate?
171
+ */
172
+export const BRIDGE_DOWN = 'conference.bridgeDown';
173
+
174
+/**
175
+ * Properties: none
176
+ *
177
+ * Known full event names:
178
+ * conference.error.p2pSessionAcceptTimeout
179
+ * conference.error.sessionAcceptTimeout
180
+ *
181
+ * TODO: document, reformat
182
+ */
183
+export const CONFERENCE_ERROR_ = 'conference.error';
184
+
185
+/**
186
+ * Properties: none
187
+ *
188
+ * TODO: document
189
+ */
190
+export const CONNECTION_INTERRUPTED = 'connection.interrupted';
191
+
192
+/**
193
+ * Properties: none
194
+ *
195
+ * Known full event names: NONE
196
+ *
197
+ * TODO: document, reformat?, deprecate?
198
+ */
199
+export const CONNECTION_DISCONNECTED_ = 'connection.disconnected';
200
+
201
+/**
202
+ * Properties: label
203
+ *
204
+ * Known full event names:
205
+ * connection.failed.connection.droppedError
206
+ * connection.failed.connection.otherError
207
+ * connection.failed.connection.passwordRequired
208
+ *
209
+ * TODO: document, reformat
210
+ */
211
+export const CONNECTION_FAILED_ = 'connection.failed';
212
+
213
+/**
214
+ * Properties: none
215
+ *
216
+ * TODO: document
217
+ */
218
+export const CONNECTION_RESTORED = 'connection.restored';
219
+
220
+/**
221
+ * Properties: value
222
+ *
223
+ * TODO: document, deprecate (is it the same as the one which is part of
224
+ * CONNECTION_TIMES?)
225
+ */
226
+export const DATA_CHANNEL_OPEN = 'conference.dataChannel.open';
227
+
228
+/**
229
+ * TODO: document, reformat
230
+ */
231
+export const DEVICE_LIST = 'devices.deviceList';
232
+
233
+/**
234
+ * User feedback event.
235
+ * Properties: value, detailed
236
+ *
237
+ * TODO: document
238
+ */
239
+export const FEEDBACK = 'feedback.rating';
240
+
241
+/**
242
+ * Properties: none
243
+ *
244
+ * TODO: document
245
+ */
246
+export const FOCUS_LEFT = 'conference.focusLeft';
247
+
248
+/**
249
+ * Properties: none
250
+ *
251
+ * Known full event names:
252
+ * getUserMedia.deviceNotFound.audio
253
+ * getUserMedia.deviceNotFound.audio.video
254
+ * getUserMedia.deviceNotFound.video
255
+ * getUserMedia.deviceNotFound.screen
256
+ *
257
+ * TODO: document, reformat, merge with GET_USER_MEDIA_FAILED?
258
+ */
259
+export const GET_USER_MEDIA_DEVICE_NOT_FOUND_
260
+    = 'getUserMedia.deviceNotFound';
261
+
262
+/**
263
+ * Properties: none
264
+ *
265
+ * Known full event names:
266
+ * getUserMedia.fail.resolution.180
267
+ * getUserMedia.fail.resolution.360
268
+ * getUserMedia.fail.resolution.640
269
+ * getUserMedia.fail.resolution.720
270
+ * getUserMedia.fail.resolution.960
271
+ *
272
+ * TODO: reformat, merge with GET_USER_MEDIA_FAILED
273
+ */
274
+export const GET_USER_MEDIA_FAIL_ = 'getUserMedia.fail';
275
+
276
+/**
277
+ * Properties: value
278
+ *
279
+ * Known full event names:
280
+ * getUserMedia.failed.Error
281
+ * getUserMedia.failed.TypeError
282
+ * getUserMedia.failed.audio.TypeError
283
+ * getUserMedia.failed.audio.gum.general
284
+ * getUserMedia.failed.audio.gum.permission_denied
285
+ * getUserMedia.failed.audio.track.no_data_from_source
286
+ * getUserMedia.failed.audio.video.180.gum.general
287
+ * getUserMedia.failed.audio.video.360.gum.general
288
+ * getUserMedia.failed.audio.video.360.gum.permission_denied
289
+ * getUserMedia.failed.audio.video.360.track.no_data_from_source
290
+ * getUserMedia.failed.audio.video.720.TypeError
291
+ * getUserMedia.failed.audio.video.720.gum.constraint_failed
292
+ * getUserMedia.failed.audio.video.720.gum.general
293
+ * getUserMedia.failed.audio.video.720.gum.permission_denied
294
+ * getUserMedia.failed.audio.video.720.track.no_data_from_source
295
+ * getUserMedia.failed.audio.video.960.gum.permission_denied
296
+ * getUserMedia.failed.audio.video.undefined.gum.general
297
+ * getUserMedia.failed.desktop.TypeError
298
+ * getUserMedia.failed.desktop.gum.chrome_extension_generic_error
299
+ * getUserMedia.failed.desktop.gum.chrome_extension_installation_error
300
+ * getUserMedia.failed.desktop.gum.chrome_extension_user_gesture_required
301
+ * getUserMedia.failed.desktop.gum.general
302
+ * getUserMedia.failed.desktop.track.no_data_from_source
303
+ * getUserMedia.failed.gum.chrome_extension_generic_error
304
+ * getUserMedia.failed.gum.chrome_extension_installation_error
305
+ * getUserMedia.failed.gum.constraint_failed
306
+ * getUserMedia.failed.gum.firefox_extension_needed
307
+ * getUserMedia.failed.gum.general
308
+ * getUserMedia.failed.gum.permission_denied
309
+ * getUserMedia.failed.undefined
310
+ * getUserMedia.failed.video.360.gum.permission_denied
311
+ * getUserMedia.failed.video.720.TypeError
312
+ * getUserMedia.failed.video.720.gum.constraint_failed
313
+ * getUserMedia.failed.video.720.gum.general
314
+ * getUserMedia.failed.video.720.gum.permission_denied
315
+ * getUserMedia.failed.video.720.track.no_data_from_source
316
+ * getUserMedia.failed.video.undefined.TypeError
317
+ * getUserMedia.failed.video.undefined.gum.general
318
+ * getUserMedia.failed.video.undefined.track.no_data_from_source
319
+ *
320
+ * TODO: reformat
321
+ */
322
+export const GET_USER_MEDIA_FAILED_ = 'getUserMedia.failed';
323
+
324
+/**
325
+ * Properties: value
326
+ *
327
+ * Known full event names:
328
+ * getUserMedia.success
329
+ * getUserMedia.success.audio
330
+ * getUserMedia.success.audio.video.180
331
+ * getUserMedia.success.audio.video.300
332
+ * getUserMedia.success.audio.video.360
333
+ * getUserMedia.success.audio.video.720
334
+ * getUserMedia.success.audio.video.960
335
+ * getUserMedia.success.audio.video.undefined
336
+ * getUserMedia.success.desktop
337
+ * getUserMedia.success.video.180
338
+ * getUserMedia.success.video.360
339
+ * getUserMedia.success.video.720
340
+ * getUserMedia.success.video.960
341
+ * getUserMedia.success.video.undefined
342
+ *
343
+ * TODO: document, reformat
344
+ */
345
+export const GET_USER_MEDIA_SUCCESS_ = 'getUserMedia.success';
346
+
347
+/**
348
+ * Properties: none
349
+ *
350
+ * Known full event names:
351
+ * getUserMedia.userCancel.extensionInstall
352
+ *
353
+ * TODO: document, reformat
354
+ */
355
+export const GET_USER_MEDIA_USER_CANCEL_ = 'getUserMedia.userCancel';
356
+
357
+/**
358
+ * Properties: value
359
+ *
360
+ * The "value" property contains the difference in milliseconds between
361
+ * the ICE establishment time for the P2P and JVB connections (e.g. a value
362
+ * of 10 would indicate that the P2P was 10ms slower than JVB).
363
+ */
364
+export const ICE_ESTABLISHMENT_DURATION_DIFF
365
+    = 'ice.establishmentDurationDiff';
366
+
367
+/**
368
+ * Properties: none
369
+ *
370
+ * TODO: document
371
+ * TODO: do we need this in addition to _ICE_CONNECTION_STATE?
372
+ */
373
+export const ICE_FAILED = 'connection.ice_failed';
374
+
375
+/**
376
+ * Properties: none
377
+ *
378
+ * TODO: document
379
+ */
380
+export const P2P_ESTABLISHED = 'p2p.established';
381
+
382
+/**
383
+ * Properties: none
384
+ *
385
+ * TODO: document
386
+ */
387
+export const P2P_FAILED = 'p2p.failed';
388
+
389
+/**
390
+ * Properties: none
391
+ *
392
+ * TODO: document
393
+ */
394
+export const P2P_SWITCH_TO_JVB = 'p2p.switch_to_jvb';
395
+
396
+/**
397
+ * Properties: none
398
+ *
399
+ * TODO: document
400
+ */
401
+export const REMOTELY_MUTED = 'conference.remotelyMuted';
402
+
403
+/**
404
+ * Properties: value
405
+ *
406
+ * TODO: document
407
+ *
408
+ * The "value" property contains the delay in milliseconds between joining
409
+ * the MUC and receiving a Jingle session-initiate from Jicofo (but not
410
+ * P2P).
411
+ */
412
+export const SESSION_INITIATE = 'session.initiate';
413
+
414
+/**
415
+ * Properties: value
416
+ *
417
+ * TODO: document
418
+ */
419
+export const SESSION_INITIATE_RECEIVED = 'xmpp.session-initiate';
420
+
421
+/**
422
+ * Properties: none
423
+ *
424
+ * TODO: document
425
+ */
426
+export const SESSION_TERMINATE = 'session.terminate';
427
+
428
+/**
429
+ * Properties: none
430
+ *
431
+ * TODO: document
432
+ */
433
+export const SESSION_RESTART = 'session.restart';
434
+
435
+/**
436
+ * Properties: value
437
+ *
438
+ * TODO: document
439
+ */
440
+export const TRANSPORT_REPLACE_START = 'xmpp.transport-replace.start';
441
+
442
+/**
443
+ * Properties: value
444
+ *
445
+ * TODO: document
446
+ */
447
+export const TRANSPORT_REPLACE_SUCCESS = 'xmpp.transport-replace.success';

Loading…
İptal
Kaydet