|
|
@@ -4,6 +4,7 @@ import { getLogger } from 'jitsi-meet-logger';
|
|
4
|
4
|
import * as ConnectionQualityEvents
|
|
5
|
5
|
from '../../service/connectivity/ConnectionQualityEvents';
|
|
6
|
6
|
import * as ConferenceEvents from '../../JitsiConferenceEvents';
|
|
|
7
|
+import RTCBrowserType from '../RTC/RTCBrowserType';
|
|
7
|
8
|
import Statistics from './statistics';
|
|
8
|
9
|
|
|
9
|
10
|
const logger = getLogger(__filename);
|
|
|
@@ -32,7 +33,8 @@ class AverageStatReport {
|
|
32
|
33
|
addNext(nextValue) {
|
|
33
|
34
|
if (typeof nextValue !== 'number') {
|
|
34
|
35
|
logger.error(
|
|
35
|
|
- `${this.name} - invalid value for idx: ${this.count}`);
|
|
|
36
|
+ `${this.name} - invalid value for idx: ${this.count}`,
|
|
|
37
|
+ nextValue);
|
|
36
|
38
|
|
|
37
|
39
|
return;
|
|
38
|
40
|
}
|
|
|
@@ -268,8 +270,12 @@ export default class AvgRTPStatsReporter {
|
|
268
|
270
|
|
|
269
|
271
|
this._avgBitrateUp.addNext(bitrate.upload);
|
|
270
|
272
|
this._avgBitrateDown.addNext(bitrate.download);
|
|
271
|
|
- this._avgBandwidthUp.addNext(bandwidth.upload);
|
|
272
|
|
- this._avgBandwidthDown.addNext(bandwidth.download);
|
|
|
273
|
+
|
|
|
274
|
+ if (RTCBrowserType.supportsBandwidthStatistics()) {
|
|
|
275
|
+ this._avgBandwidthUp.addNext(bandwidth.upload);
|
|
|
276
|
+ this._avgBandwidthDown.addNext(bandwidth.download);
|
|
|
277
|
+ }
|
|
|
278
|
+
|
|
273
|
279
|
this._avgPacketLossUp.addNext(packetLoss.upload);
|
|
274
|
280
|
this._avgPacketLossDown.addNext(packetLoss.download);
|
|
275
|
281
|
this._avgPacketLossTotal.addNext(packetLoss.total);
|
|
|
@@ -287,8 +293,10 @@ export default class AvgRTPStatsReporter {
|
|
287
|
293
|
if (this._sampleIdx >= this._n) {
|
|
288
|
294
|
this._avgBitrateUp.report(isP2P);
|
|
289
|
295
|
this._avgBitrateDown.report(isP2P);
|
|
290
|
|
- this._avgBandwidthUp.report(isP2P);
|
|
291
|
|
- this._avgBandwidthDown.report(isP2P);
|
|
|
296
|
+ if (RTCBrowserType.supportsBandwidthStatistics()) {
|
|
|
297
|
+ this._avgBandwidthUp.report(isP2P);
|
|
|
298
|
+ this._avgBandwidthDown.report(isP2P);
|
|
|
299
|
+ }
|
|
292
|
300
|
this._avgPacketLossUp.report(isP2P);
|
|
293
|
301
|
this._avgPacketLossDown.report(isP2P);
|
|
294
|
302
|
this._avgPacketLossTotal.report(isP2P);
|