Browse Source

feat: Adds TURN indication.

j8
George Politis 8 years ago
parent
commit
62613ff02e

+ 2
- 1
lang/main.json View File

199
         "transport_plural": "Transports:",
199
         "transport_plural": "Transports:",
200
         "bandwidth": "Estimated bandwidth:",
200
         "bandwidth": "Estimated bandwidth:",
201
         "na": "Come back here for connection information once the conference starts",
201
         "na": "Come back here for connection information once the conference starts",
202
-        "peer_to_peer": " (p2p)"
202
+        "peer_to_peer": " (p2p)",
203
+        "turn": " (turn)"
203
     },
204
     },
204
     "notify": {
205
     "notify": {
205
         "disconnected": "disconnected",
206
         "disconnected": "disconnected",

+ 16
- 4
react/features/connection-stats/components/ConnectionStatsTable.js View File

380
         }
380
         }
381
 
381
 
382
         // All of the transports should be either P2P or JVB
382
         // All of the transports should be either P2P or JVB
383
-        const isP2P = transport.length ? transport[0].p2p : false;
383
+        let isP2P = false, isTURN = false;
384
+
385
+        if (transport.length) {
386
+            isP2P = transport[0].p2p;
387
+            isTURN = transport[0].localCandidateType === 'relay'
388
+                || transport[0].remoteCandidateType === 'relay';
389
+        }
390
+
391
+        let additionalData = null;
392
+
393
+        if (isP2P) {
394
+            additionalData = isTURN
395
+                ? <span>{ t('connectionindicator.turn') }</span>
396
+                : <span>{ t('connectionindicator.peer_to_peer') }</span>;
397
+        }
384
 
398
 
385
         // First show remote statistics, then local, and then transport type.
399
         // First show remote statistics, then local, and then transport type.
386
         const tableRowConfigurations = [
400
         const tableRowConfigurations = [
387
             {
401
             {
388
-                additionalData: isP2P
389
-                    ? <span>{ t('connectionindicator.peer_to_peer') }</span>
390
-                    : null,
402
+                additionalData,
391
                 data: data.remoteIP,
403
                 data: data.remoteIP,
392
                 key: 'remoteaddress',
404
                 key: 'remoteaddress',
393
                 label: t('connectionindicator.remoteaddress',
405
                 label: t('connectionindicator.remoteaddress',

Loading…
Cancel
Save