Procházet zdrojové kódy

Merge pull request #466 from jitsi/rtcp-from-default-sender-ssrcs

ref(sdp): Do not add recvonly SSRC for muted video tracks.
dev1
bgrozev před 8 roky
rodič
revize
5e9c8699c6
2 změnil soubory, kde provedl 6 přidání a 10 odebrání
  1. 0
    8
      modules/RTC/LocalSdpMunger.js
  2. 6
    2
      modules/xmpp/SdpConsistency.js

+ 0
- 8
modules/RTC/LocalSdpMunger.js Zobrazit soubor

@@ -93,14 +93,6 @@ export default class LocalSdpMunger {
93 93
                 // eslint-disable-next-line no-continue
94 94
                 continue;
95 95
             }
96
-            if (!videoMLine.getSSRCCount()) {
97
-                logger.error(
98
-                    `${this.tpc} - no video SSRCs found`
99
-                        + '(should be at least the recv-only one)');
100
-
101
-                // eslint-disable-next-line no-continue
102
-                continue;
103
-            }
104 96
 
105 97
             modified = true;
106 98
 

+ 6
- 2
modules/xmpp/SdpConsistency.js Zobrazit soubor

@@ -35,6 +35,7 @@ export default class SdpConsistency {
35 35
      */
36 36
     clearVideoSsrcCache() {
37 37
         this.cachedPrimarySsrc = null;
38
+        this.injectRecvOnly = false;
38 39
     }
39 40
 
40 41
     /**
@@ -81,17 +82,18 @@ export default class SdpConsistency {
81 82
 
82 83
             return sdpStr;
83 84
         }
85
+
84 86
         if (videoMLine.direction === 'recvonly') {
85 87
             // If the mline is recvonly, we'll add the primary
86 88
             //  ssrc as a recvonly ssrc
87
-            if (this.cachedPrimarySsrc) {
89
+            if (this.cachedPrimarySsrc && this.injectRecvOnly) {
88 90
                 videoMLine.addSSRCAttribute({
89 91
                     id: this.cachedPrimarySsrc,
90 92
                     attribute: 'cname',
91 93
                     value: `recvonly-${this.cachedPrimarySsrc}`
92 94
                 });
93 95
             } else {
94
-                logger.error(
96
+                logger.info(
95 97
                     `${this.logPrefix} no SSRC found for the recvonly video`
96 98
                         + 'stream!');
97 99
             }
@@ -129,6 +131,8 @@ export default class SdpConsistency {
129 131
                     `${this.logPrefix} sdp-consistency caching primary ssrc`
130 132
                         + `${this.cachedPrimarySsrc}`);
131 133
             }
134
+
135
+            this.injectRecvOnly = true;
132 136
         }
133 137
 
134 138
         return sdpTransformer.toRawSDP();

Načítá se…
Zrušit
Uložit