|
@@ -42,7 +42,6 @@ function JitsiConference(options) {
|
42
|
42
|
this.room.updateDeviceAvailability(RTC.getDeviceAvailability());
|
43
|
43
|
this.rtc = new RTC(this.room, options);
|
44
|
44
|
this.statistics = new Statistics({
|
45
|
|
- disableAudioLevels: RTC.options.disableAudioLevels,
|
46
|
45
|
callStatsID: this.options.config.callStatsID,
|
47
|
46
|
callStatsSecret: this.options.config.callStatsSecret,
|
48
|
47
|
disableThirdPartyRequests: this.options.config.disableThirdPartyRequests
|
|
@@ -1332,6 +1331,7 @@ var LibJitsiMeet = {
|
1332
|
1331
|
*/
|
1333
|
1332
|
_gumFailedHandler: [],
|
1334
|
1333
|
init: function (options) {
|
|
1334
|
+ Statistics.audioLevelsEnabled = !options.disableAudioLevels || true;
|
1335
|
1335
|
return RTC.init(options || {});
|
1336
|
1336
|
},
|
1337
|
1337
|
/**
|
|
@@ -6487,12 +6487,12 @@ function Statistics(options) {
|
6487
|
6487
|
&& (this.options.disableThirdPartyRequests !== true);
|
6488
|
6488
|
if(this.callStatsIntegrationEnabled)
|
6489
|
6489
|
loadCallStatsAPI();
|
6490
|
|
- this.audioLevelsEnabled = !this.disableAudioLevels || true;
|
6491
|
6490
|
this.callStats = null;
|
6492
|
6491
|
}
|
|
6492
|
+Statistics.audioLevelsEnabled = false;
|
6493
|
6493
|
|
6494
|
6494
|
Statistics.prototype.startRemoteStats = function (peerconnection) {
|
6495
|
|
- if(!this.audioLevelsEnabled)
|
|
6495
|
+ if(!Statistics.audioLevelsEnabled)
|
6496
|
6496
|
return;
|
6497
|
6497
|
|
6498
|
6498
|
if (this.rtpStats) {
|
|
@@ -6506,7 +6506,7 @@ Statistics.prototype.startRemoteStats = function (peerconnection) {
|
6506
|
6506
|
Statistics.localStats = [];
|
6507
|
6507
|
|
6508
|
6508
|
Statistics.startLocalStats = function (stream, callback) {
|
6509
|
|
- if(!this.audioLevelsEnabled)
|
|
6509
|
+ if(!Statistics.audioLevelsEnabled)
|
6510
|
6510
|
return;
|
6511
|
6511
|
var localStats = new LocalStats(stream, 200, callback);
|
6512
|
6512
|
this.localStats.push(localStats);
|
|
@@ -6515,20 +6515,20 @@ Statistics.startLocalStats = function (stream, callback) {
|
6515
|
6515
|
|
6516
|
6516
|
Statistics.prototype.addAudioLevelListener = function(listener)
|
6517
|
6517
|
{
|
6518
|
|
- if(!this.audioLevelsEnabled)
|
|
6518
|
+ if(!Statistics.audioLevelsEnabled)
|
6519
|
6519
|
return;
|
6520
|
6520
|
this.eventEmitter.on(StatisticsEvents.AUDIO_LEVEL, listener);
|
6521
|
6521
|
}
|
6522
|
6522
|
|
6523
|
6523
|
Statistics.prototype.removeAudioLevelListener = function(listener)
|
6524
|
6524
|
{
|
6525
|
|
- if(!this.audioLevelsEnabled)
|
|
6525
|
+ if(!Statistics.audioLevelsEnabled)
|
6526
|
6526
|
return;
|
6527
|
6527
|
this.eventEmitter.removeListener(StatisticsEvents.AUDIO_LEVEL, listener);
|
6528
|
6528
|
}
|
6529
|
6529
|
|
6530
|
6530
|
Statistics.prototype.dispose = function () {
|
6531
|
|
- if(this.audioLevelsEnabled) {
|
|
6531
|
+ if(Statistics.audioLevelsEnabled) {
|
6532
|
6532
|
Statistics.stopAllLocalStats();
|
6533
|
6533
|
this.stopRemote();
|
6534
|
6534
|
if(this.eventEmitter)
|
|
@@ -6547,7 +6547,7 @@ Statistics.prototype.dispose = function () {
|
6547
|
6547
|
|
6548
|
6548
|
|
6549
|
6549
|
Statistics.stopAllLocalStats = function () {
|
6550
|
|
- if(!this.audioLevelsEnabled)
|
|
6550
|
+ if(!Statistics.audioLevelsEnabled)
|
6551
|
6551
|
return;
|
6552
|
6552
|
|
6553
|
6553
|
for(var i = 0; i < this.localStats.length; i++)
|
|
@@ -6556,7 +6556,7 @@ Statistics.stopAllLocalStats = function () {
|
6556
|
6556
|
}
|
6557
|
6557
|
|
6558
|
6558
|
Statistics.stopLocalStats = function (stream) {
|
6559
|
|
- if(!this.audioLevelsEnabled)
|
|
6559
|
+ if(!Statistics.audioLevelsEnabled)
|
6560
|
6560
|
return;
|
6561
|
6561
|
|
6562
|
6562
|
for(var i = 0; i < Statistics.localStats.length; i++)
|
|
@@ -6568,7 +6568,7 @@ Statistics.stopLocalStats = function (stream) {
|
6568
|
6568
|
}
|
6569
|
6569
|
|
6570
|
6570
|
Statistics.prototype.stopRemote = function () {
|
6571
|
|
- if (this.rtpStats && this.audioLevelsEnabled) {
|
|
6571
|
+ if (this.rtpStats && Statistics.audioLevelsEnabled) {
|
6572
|
6572
|
this.rtpStats.stop();
|
6573
|
6573
|
this.eventEmitter.emit(StatisticsEvents.STOP);
|
6574
|
6574
|
this.rtpStats = null;
|
|
@@ -6586,7 +6586,7 @@ Statistics.prototype.stopRemote = function () {
|
6586
|
6586
|
* at this time.
|
6587
|
6587
|
*/
|
6588
|
6588
|
Statistics.prototype.getPeerSSRCAudioLevel = function (peerJid, ssrc) {
|
6589
|
|
- if(!this.audioLevelsEnabled)
|
|
6589
|
+ if(!Statistics.audioLevelsEnabled)
|
6590
|
6590
|
return;
|
6591
|
6591
|
var peerStats = this.rtpStats.jid2stats[peerJid];
|
6592
|
6592
|
|