Browse Source

feat: Adds TURN indication.

j8
George Politis 8 years ago
parent
commit
62613ff02e
2 changed files with 18 additions and 5 deletions
  1. 2
    1
      lang/main.json
  2. 16
    4
      react/features/connection-stats/components/ConnectionStatsTable.js

+ 2
- 1
lang/main.json View File

@@ -199,7 +199,8 @@
199 199
         "transport_plural": "Transports:",
200 200
         "bandwidth": "Estimated bandwidth:",
201 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 205
     "notify": {
205 206
         "disconnected": "disconnected",

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

@@ -380,14 +380,26 @@ class ConnectionStatsTable extends Component {
380 380
         }
381 381
 
382 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 399
         // First show remote statistics, then local, and then transport type.
386 400
         const tableRowConfigurations = [
387 401
             {
388
-                additionalData: isP2P
389
-                    ? <span>{ t('connectionindicator.peer_to_peer') }</span>
390
-                    : null,
402
+                additionalData,
391 403
                 data: data.remoteIP,
392 404
                 key: 'remoteaddress',
393 405
                 label: t('connectionindicator.remoteaddress',

Loading…
Cancel
Save