|
|
@@ -33,6 +33,12 @@ class ConnectionStatsTable extends Component {
|
|
33
|
33
|
*/
|
|
34
|
34
|
bitrate: PropTypes.object,
|
|
35
|
35
|
|
|
|
36
|
+ /**
|
|
|
37
|
+ * The number of bridges (aka media servers) currently used in the
|
|
|
38
|
+ * conference.
|
|
|
39
|
+ */
|
|
|
40
|
+ bridgeCount: PropTypes.number,
|
|
|
41
|
+
|
|
36
|
42
|
/**
|
|
37
|
43
|
* A message describing the connection quality.
|
|
38
|
44
|
*/
|
|
|
@@ -71,7 +77,7 @@ class ConnectionStatsTable extends Component {
|
|
71
|
77
|
packetLoss: PropTypes.object,
|
|
72
|
78
|
|
|
73
|
79
|
/**
|
|
74
|
|
- * The region.
|
|
|
80
|
+ * The region that we think the client is in.
|
|
75
|
81
|
*/
|
|
76
|
82
|
region: PropTypes.string,
|
|
77
|
83
|
|
|
|
@@ -86,6 +92,11 @@ class ConnectionStatsTable extends Component {
|
|
86
|
92
|
*/
|
|
87
|
93
|
resolution: PropTypes.object,
|
|
88
|
94
|
|
|
|
95
|
+ /**
|
|
|
96
|
+ * The region of the media server that we are connected to.
|
|
|
97
|
+ */
|
|
|
98
|
+ serverRegion: PropTypes.string,
|
|
|
99
|
+
|
|
89
|
100
|
/**
|
|
90
|
101
|
* Whether or not additional stats about bandwidth and transport should
|
|
91
|
102
|
* be displayed. Will not display even if true for remote participants.
|
|
|
@@ -124,7 +135,7 @@ class ConnectionStatsTable extends Component {
|
|
124
|
135
|
|
|
125
|
136
|
/**
|
|
126
|
137
|
* Creates a table as ReactElement that will display additional statistics
|
|
127
|
|
- * related to bandwidth and transport.
|
|
|
138
|
+ * related to bandwidth and transport for the local user.
|
|
128
|
139
|
*
|
|
129
|
140
|
* @private
|
|
130
|
141
|
* @returns {ReactElement}
|
|
|
@@ -135,6 +146,7 @@ class ConnectionStatsTable extends Component {
|
|
135
|
146
|
<tbody>
|
|
136
|
147
|
{ this._renderBandwidth() }
|
|
137
|
148
|
{ this._renderTransport() }
|
|
|
149
|
+ { this._renderRegion() }
|
|
138
|
150
|
</tbody>
|
|
139
|
151
|
</table>
|
|
140
|
152
|
);
|
|
|
@@ -226,23 +238,74 @@ class ConnectionStatsTable extends Component {
|
|
226
|
238
|
* @private
|
|
227
|
239
|
*/
|
|
228
|
240
|
_renderE2eRtt() {
|
|
229
|
|
- const { e2eRtt, region, t } = this.props;
|
|
230
|
|
- let str = e2eRtt ? `${e2eRtt.toFixed(0)}ms` : 'N/A';
|
|
|
241
|
+ const { e2eRtt, t } = this.props;
|
|
|
242
|
+ const str = e2eRtt ? `${e2eRtt.toFixed(0)}ms` : 'N/A';
|
|
231
|
243
|
|
|
232
|
|
- if (region) {
|
|
233
|
|
- str += ` (${region})`;
|
|
|
244
|
+ return (
|
|
|
245
|
+ <tr>
|
|
|
246
|
+ <td>
|
|
|
247
|
+ <span>{ t('connectionindicator.e2e_rtt') }</span>
|
|
|
248
|
+ </td>
|
|
|
249
|
+ <td>{ str }</td>
|
|
|
250
|
+ </tr>
|
|
|
251
|
+ );
|
|
|
252
|
+ }
|
|
|
253
|
+
|
|
|
254
|
+ /**
|
|
|
255
|
+ * Creates a table row as a ReactElement for displaying the "connected to"
|
|
|
256
|
+ * information.
|
|
|
257
|
+ *
|
|
|
258
|
+ * @returns {ReactElement}
|
|
|
259
|
+ * @private
|
|
|
260
|
+ */
|
|
|
261
|
+ _renderRegion() {
|
|
|
262
|
+ const { region, serverRegion, t } = this.props;
|
|
|
263
|
+ let str = serverRegion;
|
|
|
264
|
+
|
|
|
265
|
+ if (!serverRegion) {
|
|
|
266
|
+ return;
|
|
|
267
|
+ }
|
|
|
268
|
+
|
|
|
269
|
+
|
|
|
270
|
+ if (region && serverRegion && region !== serverRegion) {
|
|
|
271
|
+ str += ` from ${region}`;
|
|
234
|
272
|
}
|
|
235
|
273
|
|
|
236
|
274
|
return (
|
|
237
|
275
|
<tr>
|
|
238
|
276
|
<td>
|
|
239
|
|
- <span>{ t('connectionindicator.e2e_rtt') }</span>
|
|
|
277
|
+ <span>{ t('connectionindicator.connectedTo') }</span>
|
|
240
|
278
|
</td>
|
|
241
|
279
|
<td>{ str }</td>
|
|
242
|
280
|
</tr>
|
|
243
|
281
|
);
|
|
244
|
282
|
}
|
|
245
|
283
|
|
|
|
284
|
+ /**
|
|
|
285
|
+ * Creates a table row as a ReactElement for displaying the "bridge count"
|
|
|
286
|
+ * information.
|
|
|
287
|
+ *
|
|
|
288
|
+ * @returns {*}
|
|
|
289
|
+ * @private
|
|
|
290
|
+ */
|
|
|
291
|
+ _renderBridgeCount() {
|
|
|
292
|
+ const { bridgeCount, t } = this.props;
|
|
|
293
|
+
|
|
|
294
|
+ // 0 is valid, but undefined/null/NaN aren't.
|
|
|
295
|
+ if (!bridgeCount && bridgeCount !== 0) {
|
|
|
296
|
+ return;
|
|
|
297
|
+ }
|
|
|
298
|
+
|
|
|
299
|
+ return (
|
|
|
300
|
+ <tr>
|
|
|
301
|
+ <td>
|
|
|
302
|
+ <span>{ t('connectionindicator.bridgeCount') }</span>
|
|
|
303
|
+ </td>
|
|
|
304
|
+ <td>{ bridgeCount }</td>
|
|
|
305
|
+ </tr>
|
|
|
306
|
+ );
|
|
|
307
|
+ }
|
|
|
308
|
+
|
|
246
|
309
|
/**
|
|
247
|
310
|
* Creates a table row as a ReactElement for displaying frame rate related
|
|
248
|
311
|
* statistics.
|
|
|
@@ -373,8 +436,10 @@ class ConnectionStatsTable extends Component {
|
|
373
|
436
|
{ this._renderBitrate() }
|
|
374
|
437
|
{ this._renderPacketLoss() }
|
|
375
|
438
|
{ isRemoteVideo ? this._renderE2eRtt() : null }
|
|
|
439
|
+ { isRemoteVideo ? this._renderRegion() : null }
|
|
376
|
440
|
{ this._renderResolution() }
|
|
377
|
441
|
{ this._renderFrameRate() }
|
|
|
442
|
+ { isRemoteVideo ? null : this._renderBridgeCount() }
|
|
378
|
443
|
</tbody>
|
|
379
|
444
|
</table>
|
|
380
|
445
|
);
|