Quellcode durchsuchen

Updates the lib

master
hristoterezov vor 9 Jahren
Ursprung
Commit
a0355ea080
1 geänderte Dateien mit 11 neuen und 11 gelöschten Zeilen
  1. 11
    11
      libs/lib-jitsi-meet.js

+ 11
- 11
libs/lib-jitsi-meet.js Datei anzeigen

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

Laden…
Abbrechen
Speichern