Przeglądaj źródła

feat: Displays the E2E RTT in the connection stats table. (#3344)

* feat: Displays the E2E RTT in the connection stats table.

* fix: Whitelists the ping config properties.

* ref: Addresses feedback.

* npm: Updates lib-jitsi-meet to e097a1189e.

* ref: Moves the e2ertt and region to the existing stats object.
master
bgrozev 6 lat temu
rodzic
commit
2ee1bf9351

+ 12
- 0
config.js Wyświetl plik

347
         // userRegion: "asia"
347
         // userRegion: "asia"
348
     }
348
     }
349
 
349
 
350
+    // Options related to end-to-end (participant to participant) ping.
351
+    // e2eping: {
352
+    //   // The interval in milliseconds at which pings will be sent.
353
+    //   // Defaults to 10000, set to <= 0 to disable.
354
+    //   pingInterval: 10000,
355
+    //
356
+    //   // The interval in milliseconds at which analytics events
357
+    //   // with the measured RTT will be sent. Defaults to 60000, set
358
+    //   // to <= 0 to disable.
359
+    //   analyticsInterval: 60000,
360
+    //   }
361
+
350
     // List of undocumented settings used in jitsi-meet
362
     // List of undocumented settings used in jitsi-meet
351
     /**
363
     /**
352
      _immediateReloadThreshold
364
      _immediateReloadThreshold

+ 1
- 0
lang/main.json Wyświetl plik

198
         "packetloss": "Packet loss:",
198
         "packetloss": "Packet loss:",
199
         "resolution": "Resolution:",
199
         "resolution": "Resolution:",
200
         "framerate": "Frame rate:",
200
         "framerate": "Frame rate:",
201
+        "e2e_rtt": "E2E RTT:",
201
         "less": "Show less",
202
         "less": "Show less",
202
         "more": "Show more",
203
         "more": "Show more",
203
         "address": "Address:",
204
         "address": "Address:",

+ 5
- 5
package-lock.json Wyświetl plik

9719
       }
9719
       }
9720
     },
9720
     },
9721
     "lib-jitsi-meet": {
9721
     "lib-jitsi-meet": {
9722
-      "version": "github:jitsi/lib-jitsi-meet#2be752fc88ff71e454c6b9178b21a33b59c53f41",
9723
-      "from": "github:jitsi/lib-jitsi-meet#2be752fc88ff71e454c6b9178b21a33b59c53f41",
9722
+      "version": "github:jitsi/lib-jitsi-meet#e097a1189ed99838605d90b959e129155bc0e50a",
9723
+      "from": "github:jitsi/lib-jitsi-meet#e097a1189ed99838605d90b959e129155bc0e50a",
9724
       "requires": {
9724
       "requires": {
9725
         "@jitsi/sdp-interop": "0.1.13",
9725
         "@jitsi/sdp-interop": "0.1.13",
9726
         "@jitsi/sdp-simulcast": "0.2.1",
9726
         "@jitsi/sdp-simulcast": "0.2.1",
14298
       }
14298
       }
14299
     },
14299
     },
14300
     "sdp": {
14300
     "sdp": {
14301
-      "version": "2.7.4",
14302
-      "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.7.4.tgz",
14303
-      "integrity": "sha512-0+wTfgvUUEGcvvFoHIC0aiGbx6gzwAUm8FkKt5Oqqkjf9mEEDLgwnoDKX7MYTGXrNNwzikVbutJ+OVNAGmJBQw=="
14301
+      "version": "2.8.0",
14302
+      "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.8.0.tgz",
14303
+      "integrity": "sha512-wRSES07rAwKWAR7aev9UuClT7kdf9ZTdeUK5gTgHue9vlhs19Fbm3ccNEGJO4y2IitH4/JzS4sdzyPl6H2KQLw=="
14304
     },
14304
     },
14305
     "sdp-transform": {
14305
     "sdp-transform": {
14306
       "version": "2.3.0",
14306
       "version": "2.3.0",

+ 1
- 1
package.json Wyświetl plik

47
     "js-md5": "0.6.1",
47
     "js-md5": "0.6.1",
48
     "jsc-android": "224109.1.0",
48
     "jsc-android": "224109.1.0",
49
     "jwt-decode": "2.2.0",
49
     "jwt-decode": "2.2.0",
50
-    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#2be752fc88ff71e454c6b9178b21a33b59c53f41",
50
+    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#e097a1189ed99838605d90b959e129155bc0e50a",
51
     "lodash": "4.17.4",
51
     "lodash": "4.17.4",
52
     "moment": "2.19.4",
52
     "moment": "2.19.4",
53
     "moment-duration-format": "2.2.2",
53
     "moment-duration-format": "2.2.2",

+ 1
- 0
react/features/base/config/functions.js Wyświetl plik

96
     'disableRtx',
96
     'disableRtx',
97
     'disableSuspendVideo',
97
     'disableSuspendVideo',
98
     'displayJids',
98
     'displayJids',
99
+    'e2eping',
99
     'enableDisplayNameInStats',
100
     'enableDisplayNameInStats',
100
     'enableLayerSuspension',
101
     'enableLayerSuspension',
101
     'enableLipSync',
102
     'enableLipSync',

+ 1
- 0
react/features/base/lib-jitsi-meet/index.js Wyświetl plik

14
 export const JitsiConnectionEvents = JitsiMeetJS.events.connection;
14
 export const JitsiConnectionEvents = JitsiMeetJS.events.connection;
15
 export const JitsiConnectionQualityEvents
15
 export const JitsiConnectionQualityEvents
16
     = JitsiMeetJS.events.connectionQuality;
16
     = JitsiMeetJS.events.connectionQuality;
17
+export const JitsiE2ePingEvents = JitsiMeetJS.events.e2eping;
17
 export const JitsiMediaDevicesEvents = JitsiMeetJS.events.mediaDevices;
18
 export const JitsiMediaDevicesEvents = JitsiMeetJS.events.mediaDevices;
18
 export const JitsiParticipantConnectionStatus
19
 export const JitsiParticipantConnectionStatus
19
     = JitsiMeetJS.constants.participantConnectionStatus;
20
     = JitsiMeetJS.constants.participantConnectionStatus;

+ 5
- 1
react/features/connection-indicator/components/ConnectionIndicator.js Wyświetl plik

324
      * @returns {void}
324
      * @returns {void}
325
      */
325
      */
326
     _onStatsUpdated(stats = {}) {
326
     _onStatsUpdated(stats = {}) {
327
+        // Rely on React to batch setState actions.
327
         const { connectionQuality } = stats;
328
         const { connectionQuality } = stats;
328
         const newPercentageState = typeof connectionQuality === 'undefined'
329
         const newPercentageState = typeof connectionQuality === 'undefined'
329
             ? {} : { percent: connectionQuality };
330
             ? {} : { percent: connectionQuality };
337
             stats: newStats
338
             stats: newStats
338
         });
339
         });
339
 
340
 
340
-        // Rely on React to batch setState actions.
341
         this._updateIndicatorAutoHide(newStats.percent);
341
         this._updateIndicatorAutoHide(newStats.percent);
342
     }
342
     }
343
 
343
 
410
         const {
410
         const {
411
             bandwidth,
411
             bandwidth,
412
             bitrate,
412
             bitrate,
413
+            e2eRtt,
413
             framerate,
414
             framerate,
414
             packetLoss,
415
             packetLoss,
416
+            region,
415
             resolution,
417
             resolution,
416
             transport
418
             transport
417
         } = this.state.stats;
419
         } = this.state.stats;
421
                 bandwidth = { bandwidth }
423
                 bandwidth = { bandwidth }
422
                 bitrate = { bitrate }
424
                 bitrate = { bitrate }
423
                 connectionSummary = { this._getConnectionStatusTip() }
425
                 connectionSummary = { this._getConnectionStatusTip() }
426
+                e2eRtt = { e2eRtt }
424
                 framerate = { framerate }
427
                 framerate = { framerate }
425
                 isLocalVideo = { this.props.isLocalVideo }
428
                 isLocalVideo = { this.props.isLocalVideo }
426
                 onShowMore = { this._onToggleShowMore }
429
                 onShowMore = { this._onToggleShowMore }
427
                 packetLoss = { packetLoss }
430
                 packetLoss = { packetLoss }
431
+                region = { region }
428
                 resolution = { resolution }
432
                 resolution = { resolution }
429
                 shouldShowMore = { this.state.showMoreStats }
433
                 shouldShowMore = { this.state.showMoreStats }
430
                 transport = { transport } />
434
                 transport = { transport } />

+ 15
- 1
react/features/connection-indicator/statsEmitter.js Wyświetl plik

2
 
2
 
3
 import _ from 'lodash';
3
 import _ from 'lodash';
4
 
4
 
5
-import { JitsiConnectionQualityEvents } from '../base/lib-jitsi-meet';
5
+import {
6
+    JitsiConnectionQualityEvents,
7
+    JitsiE2ePingEvents
8
+} from '../base/lib-jitsi-meet';
6
 
9
 
7
 declare var APP: Object;
10
 declare var APP: Object;
8
 
11
 
33
 
36
 
34
         conference.on(JitsiConnectionQualityEvents.REMOTE_STATS_UPDATED,
37
         conference.on(JitsiConnectionQualityEvents.REMOTE_STATS_UPDATED,
35
             (id, stats) => this._emitStatsUpdate(id, stats));
38
             (id, stats) => this._emitStatsUpdate(id, stats));
39
+
40
+        conference.on(
41
+            JitsiE2ePingEvents.E2E_RTT_CHANGED,
42
+            (participant, e2eRtt) => {
43
+                const stats = {
44
+                    e2eRtt,
45
+                    region: participant.getProperty('region')
46
+                };
47
+
48
+                this._emitStatsUpdate(participant.getId(), stats);
49
+            });
36
     },
50
     },
37
 
51
 
38
     /**
52
     /**

+ 36
- 2
react/features/connection-stats/components/ConnectionStatsTable.js Wyświetl plik

39
         connectionSummary: PropTypes.string,
39
         connectionSummary: PropTypes.string,
40
 
40
 
41
         /**
41
         /**
42
-         * Statistics related to framerates for each ssrc.
42
+         * The end-to-end round-trip-time.
43
+         */
44
+        e2eRtt: PropTypes.number,
45
+
46
+        /**
47
+         * Statistics related to frame rates for each ssrc.
43
          * {{
48
          * {{
44
          *     [ ssrc ]: Number
49
          *     [ ssrc ]: Number
45
          * }}
50
          * }}
47
         framerate: PropTypes.object,
52
         framerate: PropTypes.object,
48
 
53
 
49
         /**
54
         /**
50
-         * Whether or not the statitics are for local video.
55
+         * Whether or not the statistics are for local video.
51
          */
56
          */
52
         isLocalVideo: PropTypes.bool,
57
         isLocalVideo: PropTypes.bool,
53
 
58
 
65
          */
70
          */
66
         packetLoss: PropTypes.object,
71
         packetLoss: PropTypes.object,
67
 
72
 
73
+        /**
74
+         * The region.
75
+         */
76
+        region: PropTypes.string,
77
+
68
         /**
78
         /**
69
          * Statistics related to display resolutions for each ssrc.
79
          * Statistics related to display resolutions for each ssrc.
70
          * {{
80
          * {{
208
         );
218
         );
209
     }
219
     }
210
 
220
 
221
+    /**
222
+     * Creates a table row as a ReactElement for displaying end-to-end RTT and
223
+     * the region.
224
+     *
225
+     * @returns {ReactElement}
226
+     * @private
227
+     */
228
+    _renderE2eRtt() {
229
+        const { e2eRtt, region, t } = this.props;
230
+        const str = `${e2eRtt.toFixed(0)}ms (${region ? region : 'unknown'})`;
231
+
232
+        return (
233
+            <tr>
234
+                <td>
235
+                    <span>{ t('connectionindicator.e2e_rtt') }</span>
236
+                </td>
237
+                <td>{ str }</td>
238
+            </tr>
239
+        );
240
+    }
241
+
211
     /**
242
     /**
212
      * Creates a table row as a ReactElement for displaying frame rate related
243
      * Creates a table row as a ReactElement for displaying frame rate related
213
      * statistics.
244
      * statistics.
330
      * @returns {ReactElement}
361
      * @returns {ReactElement}
331
      */
362
      */
332
     _renderStatistics() {
363
     _renderStatistics() {
364
+        const isRemoteVideo = !this.props.isLocalVideo;
365
+
333
         return (
366
         return (
334
             <table className = 'connection-info__container'>
367
             <table className = 'connection-info__container'>
335
                 <tbody>
368
                 <tbody>
336
                     { this._renderConnectionSummary() }
369
                     { this._renderConnectionSummary() }
337
                     { this._renderBitrate() }
370
                     { this._renderBitrate() }
338
                     { this._renderPacketLoss() }
371
                     { this._renderPacketLoss() }
372
+                    { isRemoteVideo ? this._renderE2eRtt() : null }
339
                     { this._renderResolution() }
373
                     { this._renderResolution() }
340
                     { this._renderFrameRate() }
374
                     { this._renderFrameRate() }
341
                 </tbody>
375
                 </tbody>

Ładowanie…
Anuluj
Zapisz