|
|
@@ -1,8 +1,10 @@
|
|
1
|
|
-/* global ssrc2jid */
|
|
|
1
|
+/* global require, ssrc2jid */
|
|
2
|
2
|
/* jshint -W117 */
|
|
3
|
3
|
var RTCBrowserType = require("../RTC/RTCBrowserType");
|
|
4
|
4
|
|
|
5
|
|
-
|
|
|
5
|
+/* Whether we support the browser we are running into for logging statistics */
|
|
|
6
|
+var browserSupported = RTCBrowserType.isChrome() ||
|
|
|
7
|
+ RTCBrowserType.isChrome();
|
|
6
|
8
|
/**
|
|
7
|
9
|
* Calculates packet lost percent using the number of lost packets and the
|
|
8
|
10
|
* number of all packet.
|
|
|
@@ -260,7 +262,7 @@ StatsCollector.prototype.start = function ()
|
|
260
|
262
|
);
|
|
261
|
263
|
}
|
|
262
|
264
|
|
|
263
|
|
- if(!config.disableStats && !navigator.mozGetUserMedia) {
|
|
|
265
|
+ if (!config.disableStats && browserSupported) {
|
|
264
|
266
|
this.statsIntervalId = setInterval(
|
|
265
|
267
|
function () {
|
|
266
|
268
|
// Interval updates
|
|
|
@@ -294,7 +296,7 @@ StatsCollector.prototype.start = function ()
|
|
294
|
296
|
);
|
|
295
|
297
|
}
|
|
296
|
298
|
|
|
297
|
|
- if (config.logStats && !navigator.mozGetUserMedia) {
|
|
|
299
|
+ if (config.logStats && browserSupported) {
|
|
298
|
300
|
this.gatherStatsIntervalId = setInterval(
|
|
299
|
301
|
function () {
|
|
300
|
302
|
self.peerconnection.getStats(
|