ソースを参照

fix(TPC): get ssrc info per ssrc and not per mline.

dev1
Jaya Allamsetty 4年前
コミット
0e180efdfa
1個のファイルの変更6行の追加6行の削除
  1. 6
    6
      modules/RTC/TraceablePeerConnection.js

+ 6
- 6
modules/RTC/TraceablePeerConnection.js ファイルの表示

@@ -646,8 +646,8 @@ TraceablePeerConnection.prototype.getRemoteSourceInfoByParticipant = function(id
646 646
     const primarySsrcs = remoteTracks.map(track => track.getSSRC());
647 647
     const sdp = new SDP(this.remoteDescription.sdp);
648 648
 
649
-    for (const media of sdp.media) {
650
-        primarySsrcs.forEach((ssrc, idx) => {
649
+    primarySsrcs.forEach((ssrc, idx) => {
650
+        for (const media of sdp.media) {
651 651
             let lines = '';
652 652
             let ssrcLines = SDPUtil.findLines(media, `a=ssrc:${ssrc}`);
653 653
 
@@ -656,7 +656,7 @@ TraceablePeerConnection.prototype.getRemoteSourceInfoByParticipant = function(id
656 656
                     removeSsrcInfo[idx] = '';
657 657
                 }
658 658
 
659
-                // Check if there are any FID groups are present for the primary ssrc.
659
+                // Check if there are any FID groups present for the primary ssrc.
660 660
                 const fidLines = SDPUtil.findLines(media, `a=ssrc-group:FID ${ssrc}`);
661 661
 
662 662
                 if (fidLines.length) {
@@ -666,10 +666,10 @@ TraceablePeerConnection.prototype.getRemoteSourceInfoByParticipant = function(id
666 666
                     ssrcLines = ssrcLines.concat(SDPUtil.findLines(media, `a=ssrc:${secondarySsrc}`));
667 667
                 }
668 668
                 removeSsrcInfo[idx] += `${ssrcLines.join('\r\n')}\r\n`;
669
+                removeSsrcInfo[idx] += lines;
669 670
             }
670
-            removeSsrcInfo[idx] += lines;
671
-        });
672
-    }
671
+        }
672
+    });
673 673
 
674 674
     return removeSsrcInfo;
675 675
 };

読み込み中…
キャンセル
保存