浏览代码

specify constraints in a way which doesnt define the AR

master
Philipp Hancke 11 年前
父节点
当前提交
a99ba44625
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2
    4
      libs/strophe/strophe.jingle.adapter.js

+ 2
- 4
libs/strophe/strophe.jingle.adapter.js 查看文件

577
         case 'fullhd':
577
         case 'fullhd':
578
             constraints.video.mandatory.minWidth = 1920;
578
             constraints.video.mandatory.minWidth = 1920;
579
             constraints.video.mandatory.minHeight = 1080;
579
             constraints.video.mandatory.minHeight = 1080;
580
-            constraints.video.optional.push({ minAspectRatio: 1.77 });
581
             break;
580
             break;
582
         case '720':
581
         case '720':
583
         case 'hd':
582
         case 'hd':
584
             constraints.video.mandatory.minWidth = 1280;
583
             constraints.video.mandatory.minWidth = 1280;
585
             constraints.video.mandatory.minHeight = 720;
584
             constraints.video.mandatory.minHeight = 720;
586
-            constraints.video.optional.push({ minAspectRatio: 1.77 });
587
             break;
585
             break;
588
         case '360':
586
         case '360':
589
             constraints.video.mandatory.minWidth = 640;
587
             constraints.video.mandatory.minWidth = 640;
590
             constraints.video.mandatory.minHeight = 360;
588
             constraints.video.mandatory.minHeight = 360;
591
-            constraints.video.optional.push({ minAspectRatio: 1.77 });
592
             break;
589
             break;
593
         case '180':
590
         case '180':
594
             constraints.video.mandatory.minWidth = 320;
591
             constraints.video.mandatory.minWidth = 320;
595
             constraints.video.mandatory.minHeight = 180;
592
             constraints.video.mandatory.minHeight = 180;
596
-            constraints.video.optional.push({ minAspectRatio: 1.77 });
597
             break;
593
             break;
598
         // 4:3
594
         // 4:3
599
         case '960':
595
         case '960':
617
             }
613
             }
618
             break;
614
             break;
619
     }
615
     }
616
+    if (constraints.video.minWidth) constraints.video.maxWidth = constraints.video.minWidth;
617
+    if (constraints.video.minHeight) constraints.video.maxHeight = constraints.video.minHeight;
620
 
618
 
621
     if (bandwidth) { // doesn't work currently, see webrtc issue 1846
619
     if (bandwidth) { // doesn't work currently, see webrtc issue 1846
622
         if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true
620
         if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true

正在加载...
取消
保存