浏览代码

fix(Firefox): Enable RTX support on Firefox

Add RFC 4588 to the list of advertised features on Firefox.
Use RtxModifier only for cases when simulcast is achieved through SDP munging
This will ensure that RTX is negotiated whenever it is offered by the browser.
release-8443
Jaya Allamsetty 5 年前
父节点
当前提交
49dd19c04a
共有 3 个文件被更改,包括 4 次插入13 次删除
  1. 2
    2
      modules/RTC/TraceablePeerConnection.js
  2. 1
    10
      modules/browser/BrowserCapabilities.js
  3. 1
    1
      modules/xmpp/xmpp.js

+ 2
- 2
modules/RTC/TraceablePeerConnection.js 查看文件

2430
                     dumpSDP(resultSdp));
2430
                     dumpSDP(resultSdp));
2431
             }
2431
             }
2432
 
2432
 
2433
-            if (!this.options.disableRtx && browser.supportsRtx()) {
2433
+            if (!this.options.disableRtx && browser.usesSdpMungingForSimulcast()) {
2434
                 // eslint-disable-next-line no-param-reassign
2434
                 // eslint-disable-next-line no-param-reassign
2435
                 resultSdp = new RTCSessionDescription({
2435
                 resultSdp = new RTCSessionDescription({
2436
                     type: resultSdp.type,
2436
                     type: resultSdp.type,
2645
             groups: []
2645
             groups: []
2646
         };
2646
         };
2647
     }
2647
     }
2648
-    if (!this.options.disableRtx && browser.supportsRtx()) {
2648
+    if (!this.options.disableRtx) {
2649
         // Specifically use a for loop here because we'll
2649
         // Specifically use a for loop here because we'll
2650
         //  be adding to the list we're iterating over, so we
2650
         //  be adding to the list we're iterating over, so we
2651
         //  only want to iterate through the items originally
2651
         //  only want to iterate through the items originally

+ 1
- 10
modules/browser/BrowserCapabilities.js 查看文件

148
         return this.isFirefox() || this.isSafari();
148
         return this.isFirefox() || this.isSafari();
149
     }
149
     }
150
 
150
 
151
-    /**
152
-     * Checks whether the browser supports RTX.
153
-     *
154
-     * @returns {boolean}
155
-     */
156
-    supportsRtx() {
157
-        return !this.isFirefox();
158
-    }
159
-
160
     /**
151
     /**
161
      * Returns whether or not the current browser can support capturing video,
152
      * Returns whether or not the current browser can support capturing video,
162
      * be it camera or desktop, and displaying received video.
153
      * be it camera or desktop, and displaying received video.
182
      * @returns {boolean}
173
      * @returns {boolean}
183
      */
174
      */
184
     usesSdpMungingForSimulcast() {
175
     usesSdpMungingForSimulcast() {
185
-        return this.isChromiumBased() || this.isSafari();
176
+        return this.isChromiumBased() || this.isReactNative() || this.isSafari();
186
     }
177
     }
187
 
178
 
188
     /**
179
     /**

+ 1
- 1
modules/xmpp/xmpp.js 查看文件

147
         this.caps.addFeature('urn:xmpp:jingle:apps:rtp:audio');
147
         this.caps.addFeature('urn:xmpp:jingle:apps:rtp:audio');
148
         this.caps.addFeature('urn:xmpp:jingle:apps:rtp:video');
148
         this.caps.addFeature('urn:xmpp:jingle:apps:rtp:video');
149
 
149
 
150
-        if (!this.options.disableRtx && browser.supportsRtx()) {
150
+        if (!this.options.disableRtx) {
151
             this.caps.addFeature('urn:ietf:rfc:4588');
151
             this.caps.addFeature('urn:ietf:rfc:4588');
152
         }
152
         }
153
 
153
 

正在加载...
取消
保存