浏览代码

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

dev1
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
             iceConfig.sdpSemantics = 'plan-b';
526
             iceConfig.sdpSemantics = 'plan-b';
527
         }
527
         }
528
 
528
 
529
+        if (options.forceTurnRelay) {
530
+            iceConfig.iceTransportPolicy = 'relay';
531
+        }
532
+
529
         // Set the RTCBundlePolicy to max-bundle so that only one set of ice candidates is generated.
533
         // Set the RTCBundlePolicy to max-bundle so that only one set of ice candidates is generated.
530
         // The default policy generates separate ice candidates for audio and video connections.
534
         // The default policy generates separate ice candidates for audio and video connections.
531
         // This change is necessary for Unified plan to work properly on Chrome and Safari.
535
         // This change is necessary for Unified plan to work properly on Chrome and Safari.

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

331
         pcOptions.capScreenshareBitrate = false;
331
         pcOptions.capScreenshareBitrate = false;
332
         pcOptions.enableInsertableStreams = options.enableInsertableStreams;
332
         pcOptions.enableInsertableStreams = options.enableInsertableStreams;
333
         pcOptions.videoQuality = options.videoQuality;
333
         pcOptions.videoQuality = options.videoQuality;
334
+        pcOptions.forceTurnRelay = options.forceTurnRelay;
334
 
335
 
335
         // codec preference options for jvb connection.
336
         // codec preference options for jvb connection.
336
         if (pcOptions.videoQuality) {
337
         if (pcOptions.videoQuality) {

正在加载...
取消
保存