Updates transport type.

Updates transport type to show multiple values as we do for addresses and ports.
This commit is contained in:
damencho 2017-03-13 17:13:01 -05:00 committed by hristoterezov
parent 8002b5ec6a
commit e5cefcce70
2 changed files with 18 additions and 4 deletions

View File

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

View File

@ -150,7 +150,12 @@ ConnectionIndicator.prototype.generateText = function () {
"data-i18n='connectionindicator.address'></span></td>" + "data-i18n='connectionindicator.address'></span></td>" +
"<td> N/A</td></tr>"; "<td> N/A</td></tr>";
} else { } else {
var data = {remoteIP: [], localIP:[], remotePort:[], localPort:[]}; var data = {
remoteIP: [],
localIP:[],
remotePort:[],
localPort:[],
transportType:[]};
for(i = 0; i < this.transport.length; i++) { for(i = 0; i < this.transport.length; i++) {
var ip = ConnectionIndicator.getIP(this.transport[i].ip); var ip = ConnectionIndicator.getIP(this.transport[i].ip);
var port = ConnectionIndicator.getPort(this.transport[i].ip); var port = ConnectionIndicator.getPort(this.transport[i].ip);
@ -173,6 +178,10 @@ ConnectionIndicator.prototype.generateText = function () {
if(data.localPort.indexOf(localPort) == -1) { if(data.localPort.indexOf(localPort) == -1) {
data.localPort.push(localPort); data.localPort.push(localPort);
} }
if(data.transportType.indexOf(this.transport[i].type) == -1) {
data.transportType.push(this.transport[i].type);
}
} }
var local_address_key = "connectionindicator.localaddress"; var local_address_key = "connectionindicator.localaddress";
@ -215,9 +224,13 @@ ConnectionIndicator.prototype.generateText = function () {
transport += "</td></tr>"; transport += "</td></tr>";
transport += localTransport + "</td></tr>"; transport += localTransport + "</td></tr>";
transport +="<tr>" + transport +="<tr>" +
"<td><span data-i18n='connectionindicator.transport'>" + "<td><span data-i18n='connectionindicator.transport' "
"</span></td>" + + " data-i18n-options='" +
"<td>" + this.transport[0].type + "</td></tr>"; JSON.stringify({count: data.transportType.length})
+ "'></span></td>" +
"<td>"
+ ConnectionIndicator.getStringFromArray(data.transportType)
+ "</td></tr>";
} }