|
|
@@ -80,10 +80,10 @@ ConnectionIndicator.prototype.generateText = function () {
|
|
80
|
80
|
packetLoss = "N/A";
|
|
81
|
81
|
} else {
|
|
82
|
82
|
|
|
83
|
|
- packetLoss = "<span class='jitsipopover_green'>↓</span>" +
|
|
|
83
|
+ packetLoss = "<span class='jitsipopover__green'>↓</span>" +
|
|
84
|
84
|
(this.packetLoss.download !== null ?
|
|
85
|
85
|
this.packetLoss.download : "N/A") +
|
|
86
|
|
- "% <span class='jitsipopover_orange'>↑</span>" +
|
|
|
86
|
+ "% <span class='jitsipopover__orange'>↑</span>" +
|
|
87
|
87
|
(this.packetLoss.upload !== null? this.packetLoss.upload : "N/A") +
|
|
88
|
88
|
"%";
|
|
89
|
89
|
}
|
|
|
@@ -95,31 +95,48 @@ ConnectionIndicator.prototype.generateText = function () {
|
|
95
|
95
|
return `${width}x${height}`;
|
|
96
|
96
|
}).join(', ') || 'N/A';
|
|
97
|
97
|
|
|
98
|
|
- var result = "<table style='width:100%'>" +
|
|
99
|
|
- "<tr>" +
|
|
100
|
|
- "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.bitrate'>" +
|
|
101
|
|
- translate("connectionindicator.bitrate") + "</span></td>" +
|
|
102
|
|
- "<td><span class='jitsipopover_green'>↓</span>" +
|
|
103
|
|
- downloadBitrate + " <span class='jitsipopover_orange'>↑</span>" +
|
|
104
|
|
- uploadBitrate + "</td>" +
|
|
105
|
|
- "</tr><tr>" +
|
|
106
|
|
- "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.packetloss'>" +
|
|
107
|
|
- translate("connectionindicator.packetloss") + "</span></td>" +
|
|
108
|
|
- "<td>" + packetLoss + "</td>" +
|
|
109
|
|
- "</tr><tr>" +
|
|
110
|
|
- "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.resolution'>" +
|
|
111
|
|
- translate("connectionindicator.resolution") + "</span></td>" +
|
|
112
|
|
- "<td>" + resolutionStr + "</td></tr></table>";
|
|
|
98
|
+ let result = (
|
|
|
99
|
+ `<table class="connection-info__container" style='width:100%'>
|
|
|
100
|
+ <tr>
|
|
|
101
|
+ <td>
|
|
|
102
|
+ <span data-i18n='connectionindicator.bitrate'>
|
|
|
103
|
+ ${translate("connectionindicator.bitrate")}
|
|
|
104
|
+ </span>
|
|
|
105
|
+ </td>
|
|
|
106
|
+ <td>
|
|
|
107
|
+ <span class='jitsipopover__green'>↓</span>${downloadBitrate}
|
|
|
108
|
+ <span class='jitsipopover__orange'>↑</span>${uploadBitrate}
|
|
|
109
|
+ </td>
|
|
|
110
|
+ </tr>
|
|
|
111
|
+ <tr>
|
|
|
112
|
+ <td>
|
|
|
113
|
+ <span data-i18n='connectionindicator.packetloss'>
|
|
|
114
|
+ ${translate("connectionindicator.packetloss")}
|
|
|
115
|
+ </span>
|
|
|
116
|
+ </td>
|
|
|
117
|
+ <td>${packetLoss}</td>
|
|
|
118
|
+ </tr>
|
|
|
119
|
+ <tr>
|
|
|
120
|
+ <td>
|
|
|
121
|
+ <span data-i18n='connectionindicator.resolution'>
|
|
|
122
|
+ ${translate("connectionindicator.resolution")}
|
|
|
123
|
+ </span>
|
|
|
124
|
+ </td>
|
|
|
125
|
+ <td>
|
|
|
126
|
+ ${resolutionStr}
|
|
|
127
|
+ </td>
|
|
|
128
|
+ </tr>
|
|
|
129
|
+ </table>`);
|
|
113
|
130
|
|
|
114
|
131
|
if(this.videoContainer.videoSpanId == "localVideoContainer") {
|
|
115
|
|
- result += "<div class=\"jitsipopover_showmore\" " +
|
|
|
132
|
+ result += "<a class=\"jitsipopover__showmore link\" " +
|
|
116
|
133
|
"onclick = \"APP.UI.connectionIndicatorShowMore('" +
|
|
117
|
134
|
// FIXME: we do not know local id when this text is generated
|
|
118
|
135
|
//this.id + "')\" data-i18n='connectionindicator." +
|
|
119
|
136
|
"local')\" data-i18n='connectionindicator." +
|
|
120
|
137
|
(this.showMoreValue ? "less" : "more") + "'>" +
|
|
121
|
138
|
translate("connectionindicator." + (this.showMoreValue ? "less" : "more")) +
|
|
122
|
|
- "</div><br />";
|
|
|
139
|
+ "</a>";
|
|
123
|
140
|
}
|
|
124
|
141
|
|
|
125
|
142
|
if (this.showMoreValue) {
|
|
|
@@ -138,7 +155,7 @@ ConnectionIndicator.prototype.generateText = function () {
|
|
138
|
155
|
|
|
139
|
156
|
if (!this.transport || this.transport.length === 0) {
|
|
140
|
157
|
transport = "<tr>" +
|
|
141
|
|
- "<td><span class='jitsipopover_blue' " +
|
|
|
158
|
+ "<td><span " +
|
|
142
|
159
|
"data-i18n='connectionindicator.address'>" +
|
|
143
|
160
|
translate("connectionindicator.address") + "</span></td>" +
|
|
144
|
161
|
"<td> N/A</td></tr>";
|
|
|
@@ -171,7 +188,7 @@ ConnectionIndicator.prototype.generateText = function () {
|
|
171
|
188
|
var local_address_key = "connectionindicator.localaddress";
|
|
172
|
189
|
var remote_address_key = "connectionindicator.remoteaddress";
|
|
173
|
190
|
var localTransport =
|
|
174
|
|
- "<tr><td><span class='jitsipopover_blue' data-i18n='" +
|
|
|
191
|
+ "<tr><td><span data-i18n='" +
|
|
175
|
192
|
local_address_key +"' data-i18n-options='" +
|
|
176
|
193
|
JSON.stringify({count: data.localIP.length}) + "'>" +
|
|
177
|
194
|
translate(local_address_key, {count: data.localIP.length}) +
|
|
|
@@ -179,7 +196,7 @@ ConnectionIndicator.prototype.generateText = function () {
|
|
179
|
196
|
ConnectionIndicator.getStringFromArray(data.localIP) +
|
|
180
|
197
|
"</td></tr>";
|
|
181
|
198
|
transport =
|
|
182
|
|
- "<tr><td><span class='jitsipopover_blue' data-i18n='" +
|
|
|
199
|
+ "<tr><td><span data-i18n='" +
|
|
183
|
200
|
remote_address_key + "' data-i18n-options='" +
|
|
184
|
201
|
JSON.stringify({count: data.remoteIP.length}) + "'>" +
|
|
185
|
202
|
translate(remote_address_key,
|
|
|
@@ -193,14 +210,14 @@ ConnectionIndicator.prototype.generateText = function () {
|
|
193
|
210
|
|
|
194
|
211
|
transport += "<tr>" +
|
|
195
|
212
|
"<td>" +
|
|
196
|
|
- "<span class='jitsipopover_blue' data-i18n='" + key_remote +
|
|
|
213
|
+ "<span data-i18n='" + key_remote +
|
|
197
|
214
|
"' data-i18n-options='" +
|
|
198
|
215
|
JSON.stringify({count: this.transport.length}) + "'>" +
|
|
199
|
216
|
translate(key_remote, {count: this.transport.length}) +
|
|
200
|
217
|
"</span></td><td>";
|
|
201
|
218
|
localTransport += "<tr>" +
|
|
202
|
219
|
"<td>" +
|
|
203
|
|
- "<span class='jitsipopover_blue' data-i18n='" + key_local +
|
|
|
220
|
+ "<span data-i18n='" + key_local +
|
|
204
|
221
|
"' data-i18n-options='" +
|
|
205
|
222
|
JSON.stringify({count: this.transport.length}) + "'>" +
|
|
206
|
223
|
translate(key_local, {count: this.transport.length}) +
|
|
|
@@ -213,21 +230,21 @@ ConnectionIndicator.prototype.generateText = function () {
|
|
213
|
230
|
transport += "</td></tr>";
|
|
214
|
231
|
transport += localTransport + "</td></tr>";
|
|
215
|
232
|
transport +="<tr>" +
|
|
216
|
|
- "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.transport'>" +
|
|
|
233
|
+ "<td><span data-i18n='connectionindicator.transport'>" +
|
|
217
|
234
|
translate("connectionindicator.transport") + "</span></td>" +
|
|
218
|
235
|
"<td>" + this.transport[0].type + "</td></tr>";
|
|
219
|
236
|
|
|
220
|
237
|
}
|
|
221
|
238
|
|
|
222
|
|
- result += "<table style='width:100%'>" +
|
|
|
239
|
+ result += "<table class='connection-info__container' style='width:100%'>" +
|
|
223
|
240
|
"<tr>" +
|
|
224
|
241
|
"<td>" +
|
|
225
|
|
- "<span class='jitsipopover_blue' data-i18n='connectionindicator.bandwidth'>" +
|
|
|
242
|
+ "<span data-i18n='connectionindicator.bandwidth'>" +
|
|
226
|
243
|
translate("connectionindicator.bandwidth") + "</span>" +
|
|
227
|
244
|
"</td><td>" +
|
|
228
|
|
- "<span class='jitsipopover_green'>↓</span>" +
|
|
|
245
|
+ "<span class='jitsipopover__green'>↓</span>" +
|
|
229
|
246
|
downloadBandwidth +
|
|
230
|
|
- " <span class='jitsipopover_orange'>↑</span>" +
|
|
|
247
|
+ " <span class='jitsipopover__orange'>↑</span>" +
|
|
231
|
248
|
uploadBandwidth + "</td></tr>";
|
|
232
|
249
|
|
|
233
|
250
|
result += transport + "</table>";
|
|
|
@@ -266,7 +283,7 @@ ConnectionIndicator.prototype.create = function () {
|
|
266
|
283
|
this.connectionIndicatorContainer);
|
|
267
|
284
|
this.popover = new JitsiPopover(
|
|
268
|
285
|
$("#" + this.videoContainer.videoSpanId + " > .connectionindicator"),
|
|
269
|
|
- {content: "<div class=\"connection_info\" data-i18n='connectionindicator.na'>" +
|
|
|
286
|
+ {content: "<div class=\"connection-info\" data-i18n='connectionindicator.na'>" +
|
|
270
|
287
|
APP.translation.translateString("connectionindicator.na") + "</div>",
|
|
271
|
288
|
skin: "black"});
|
|
272
|
289
|
|
|
|
@@ -379,9 +396,9 @@ ConnectionIndicator.prototype.updatePopoverData = function (force) {
|
|
379
|
396
|
// popover is visible or we force to do so.
|
|
380
|
397
|
if(this.popover.popoverShown || force) {
|
|
381
|
398
|
this.popover.updateContent(
|
|
382
|
|
- `<div class="connection_info">${this.generateText()}</div>`
|
|
|
399
|
+ `<div class="connection-info">${this.generateText()}</div>`
|
|
383
|
400
|
);
|
|
384
|
|
- APP.translation.translateElement($(".connection_info"));
|
|
|
401
|
+ APP.translation.translateElement($(".connection-info"));
|
|
385
|
402
|
}
|
|
386
|
403
|
};
|
|
387
|
404
|
|