Pārlūkot izejas kodu

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

ref(sdp): Do not add recvonly SSRC for muted video tracks.
dev1
bgrozev 8 gadus atpakaļ
vecāks
revīzija
5e9c8699c6
2 mainītis faili ar 6 papildinājumiem un 10 dzēšanām
  1. 0
    8
      modules/RTC/LocalSdpMunger.js
  2. 6
    2
      modules/xmpp/SdpConsistency.js

+ 0
- 8
modules/RTC/LocalSdpMunger.js Parādīt failu

93
                 // eslint-disable-next-line no-continue
93
                 // eslint-disable-next-line no-continue
94
                 continue;
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
             modified = true;
97
             modified = true;
106
 
98
 

+ 6
- 2
modules/xmpp/SdpConsistency.js Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt