ソースを参照

Merge pull request #113 from jitsi/whydoeschromegivemeweirdresolutions

specify constraints in a way which doesnt define the AR
master
Philipp Hancke 11年前
コミット
f046051ac7
1個のファイルの変更4行の追加4行の削除
  1. 4
    4
      libs/strophe/strophe.jingle.adapter.js

+ 4
- 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.mandatory.minWidth)
617
+        constraints.video.mandatory.maxWidth = constraints.video.mandatory.minWidth;
618
+    if (constraints.video.mandatory.minHeight)
619
+        constraints.video.mandatory.maxHeight = constraints.video.mandatory.minHeight;
620
 
620
 
621
     if (bandwidth) { // doesn't work currently, see webrtc issue 1846
621
     if (bandwidth) { // doesn't work currently, see webrtc issue 1846
622
         if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true
622
         if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true

読み込み中…
キャンセル
保存