Ver código fonte

Updates transport type.

Updates transport type to show multiple values as we do for addresses and ports.
master
damencho 8 anos atrás
pai
commit
e5cefcce70
2 arquivos alterados com 18 adições e 4 exclusões
  1. 1
    0
      lang/main.json
  2. 17
    4
      modules/UI/videolayout/ConnectionIndicator.js

+ 1
- 0
lang/main.json Ver arquivo

@@ -189,6 +189,7 @@
189 189
         "remoteaddress": "Remote address:",
190 190
         "remoteaddress_plural": "Remote addresses:",
191 191
         "transport": "Transport:",
192
+        "transport_plural": "Transports:",
192 193
         "bandwidth": "Estimated bandwidth:",
193 194
         "na": "Come back here for connection information once the conference starts"
194 195
     },

+ 17
- 4
modules/UI/videolayout/ConnectionIndicator.js Ver arquivo

@@ -150,7 +150,12 @@ ConnectionIndicator.prototype.generateText = function () {
150 150
                 "data-i18n='connectionindicator.address'></span></td>" +
151 151
                 "<td> N/A</td></tr>";
152 152
         } else {
153
-            var data = {remoteIP: [], localIP:[], remotePort:[], localPort:[]};
153
+            var data = {
154
+                remoteIP: [],
155
+                localIP:[],
156
+                remotePort:[],
157
+                localPort:[],
158
+                transportType:[]};
154 159
             for(i = 0; i < this.transport.length; i++) {
155 160
                 var ip =  ConnectionIndicator.getIP(this.transport[i].ip);
156 161
                 var port = ConnectionIndicator.getPort(this.transport[i].ip);
@@ -173,6 +178,10 @@ ConnectionIndicator.prototype.generateText = function () {
173 178
                 if(data.localPort.indexOf(localPort) == -1) {
174 179
                     data.localPort.push(localPort);
175 180
                 }
181
+
182
+                if(data.transportType.indexOf(this.transport[i].type) == -1) {
183
+                    data.transportType.push(this.transport[i].type);
184
+                }
176 185
             }
177 186
 
178 187
             var local_address_key = "connectionindicator.localaddress";
@@ -215,9 +224,13 @@ ConnectionIndicator.prototype.generateText = function () {
215 224
             transport += "</td></tr>";
216 225
             transport += localTransport + "</td></tr>";
217 226
             transport +="<tr>" +
218
-                "<td><span data-i18n='connectionindicator.transport'>" +
219
-                    "</span></td>" +
220
-                "<td>" + this.transport[0].type + "</td></tr>";
227
+                "<td><span data-i18n='connectionindicator.transport' "
228
+                    + " data-i18n-options='" +
229
+                    JSON.stringify({count: data.transportType.length})
230
+                + "'></span></td>" +
231
+                "<td>"
232
+                    + ConnectionIndicator.getStringFromArray(data.transportType)
233
+                + "</td></tr>";
221 234
 
222 235
         }
223 236
 

Carregando…
Cancelar
Salvar