Bläddra i källkod

Merge pull request #1765 from jitsi/feat-local-remote-relayed

feat: Adds TURN indication.
master
George Politis 8 år sedan
förälder
incheckning
d335669afe
2 ändrade filer med 18 tillägg och 5 borttagningar
  1. 2
    1
      lang/main.json
  2. 16
    4
      react/features/connection-stats/components/ConnectionStatsTable.js

+ 2
- 1
lang/main.json Visa fil

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

+ 16
- 4
react/features/connection-stats/components/ConnectionStatsTable.js Visa fil

@@ -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',

Laddar…
Avbryt
Spara