瀏覽代碼

feat: Add option to force pc to use turn relay candidates.

release-8443
Jaya Allamsetty 4 年之前
父節點
當前提交
a8dc3eaf10
共有 2 個檔案被更改,包括 5 行新增0 行删除
  1. 4
    0
      modules/RTC/RTC.js
  2. 1
    0
      modules/xmpp/JingleSessionPC.js

+ 4
- 0
modules/RTC/RTC.js 查看文件

@@ -526,6 +526,10 @@ export default class RTC extends Listenable {
526 526
             iceConfig.sdpSemantics = 'plan-b';
527 527
         }
528 528
 
529
+        if (options.forceTurnRelay) {
530
+            iceConfig.iceTransportPolicy = 'relay';
531
+        }
532
+
529 533
         // Set the RTCBundlePolicy to max-bundle so that only one set of ice candidates is generated.
530 534
         // The default policy generates separate ice candidates for audio and video connections.
531 535
         // This change is necessary for Unified plan to work properly on Chrome and Safari.

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

@@ -331,6 +331,7 @@ export default class JingleSessionPC extends JingleSession {
331 331
         pcOptions.capScreenshareBitrate = false;
332 332
         pcOptions.enableInsertableStreams = options.enableInsertableStreams;
333 333
         pcOptions.videoQuality = options.videoQuality;
334
+        pcOptions.forceTurnRelay = options.forceTurnRelay;
334 335
 
335 336
         // codec preference options for jvb connection.
336 337
         if (pcOptions.videoQuality) {

Loading…
取消
儲存