소스 검색

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

feat: Adds TURN indication.
master
George Politis 8 년 전
부모
커밋
d335669afe
2개의 변경된 파일18개의 추가작업 그리고 5개의 파일을 삭제
  1. 2
    1
      lang/main.json
  2. 16
    4
      react/features/connection-stats/components/ConnectionStatsTable.js

+ 2
- 1
lang/main.json 파일 보기

200
         "transport_plural": "Transports:",
200
         "transport_plural": "Transports:",
201
         "bandwidth": "Estimated bandwidth:",
201
         "bandwidth": "Estimated bandwidth:",
202
         "na": "Come back here for connection information once the conference starts",
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
     "notify": {
206
     "notify": {
206
         "disconnected": "disconnected",
207
         "disconnected": "disconnected",

+ 16
- 4
react/features/connection-stats/components/ConnectionStatsTable.js 파일 보기

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…
취소
저장