Просмотр исходного кода

fix(logging) Do not print 'Fowarded sources changed' log multiple times.

dev1
Jaya Allamsetty 3 лет назад
Родитель
Сommit
af17b67d99
2 измененных файлов: 4 добавлений и 4 удалений
  1. 4
    1
      modules/RTC/RTC.js
  2. 0
    3
      modules/connectivity/TrackStreamingStatus.ts

+ 4
- 1
modules/RTC/RTC.js Просмотреть файл

335
         const oldForwardedSources = this._forwardedSources || [];
335
         const oldForwardedSources = this._forwardedSources || [];
336
         let leavingForwardedSources = [];
336
         let leavingForwardedSources = [];
337
         let enteringForwardedSources = [];
337
         let enteringForwardedSources = [];
338
+        const timestamp = Date.now();
338
 
339
 
339
         this._forwardedSources = forwardedSources;
340
         this._forwardedSources = forwardedSources;
340
 
341
 
343
         enteringForwardedSources = forwardedSources.filter(
344
         enteringForwardedSources = forwardedSources.filter(
344
             sourceName => oldForwardedSources.indexOf(sourceName) === -1);
345
             sourceName => oldForwardedSources.indexOf(sourceName) === -1);
345
 
346
 
347
+        logger.debug(`Fowarded sources changed leaving=${leavingForwardedSources}, entering=`
348
+            + `${enteringForwardedSources} at ${timestamp}`);
346
         this.conference.eventEmitter.emit(
349
         this.conference.eventEmitter.emit(
347
             JitsiConferenceEvents.FORWARDED_SOURCES_CHANGED,
350
             JitsiConferenceEvents.FORWARDED_SOURCES_CHANGED,
348
             leavingForwardedSources,
351
             leavingForwardedSources,
349
             enteringForwardedSources,
352
             enteringForwardedSources,
350
-            Date.now());
353
+            timestamp);
351
     }
354
     }
352
 
355
 
353
     /**
356
     /**

+ 0
- 3
modules/connectivity/TrackStreamingStatus.ts Просмотреть файл

480
 
480
 
481
         const sourceName = this.track.getSourceName();
481
         const sourceName = this.track.getSourceName();
482
 
482
 
483
-        logger.debug(`Fowarded sources changed leaving=${leavingForwardedSources}, entering=${
484
-            enteringForwardedSources} at ${timestamp}`);
485
-
486
         // If the browser doesn't fire the mute/onmute events when the remote peer stops/starts sending media,
483
         // If the browser doesn't fire the mute/onmute events when the remote peer stops/starts sending media,
487
         // calculate the streaming status for all the tracks since it won't get triggered automatically on the track
484
         // calculate the streaming status for all the tracks since it won't get triggered automatically on the track
488
         // that has started/stopped receiving media.
485
         // that has started/stopped receiving media.

Загрузка…
Отмена
Сохранить