浏览代码

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

dev1
Jaya Allamsetty 3 年前
父节点
当前提交
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,6 +335,7 @@ export default class RTC extends Listenable {
335 335
         const oldForwardedSources = this._forwardedSources || [];
336 336
         let leavingForwardedSources = [];
337 337
         let enteringForwardedSources = [];
338
+        const timestamp = Date.now();
338 339
 
339 340
         this._forwardedSources = forwardedSources;
340 341
 
@@ -343,11 +344,13 @@ export default class RTC extends Listenable {
343 344
         enteringForwardedSources = forwardedSources.filter(
344 345
             sourceName => oldForwardedSources.indexOf(sourceName) === -1);
345 346
 
347
+        logger.debug(`Fowarded sources changed leaving=${leavingForwardedSources}, entering=`
348
+            + `${enteringForwardedSources} at ${timestamp}`);
346 349
         this.conference.eventEmitter.emit(
347 350
             JitsiConferenceEvents.FORWARDED_SOURCES_CHANGED,
348 351
             leavingForwardedSources,
349 352
             enteringForwardedSources,
350
-            Date.now());
353
+            timestamp);
351 354
     }
352 355
 
353 356
     /**

+ 0
- 3
modules/connectivity/TrackStreamingStatus.ts 查看文件

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

正在加载...
取消
保存