|
@@ -577,23 +577,19 @@ function getUserMediaWithConstraints(um, success_callback, failure_callback, res
|
577
|
577
|
case 'fullhd':
|
578
|
578
|
constraints.video.mandatory.minWidth = 1920;
|
579
|
579
|
constraints.video.mandatory.minHeight = 1080;
|
580
|
|
- constraints.video.optional.push({ minAspectRatio: 1.77 });
|
581
|
580
|
break;
|
582
|
581
|
case '720':
|
583
|
582
|
case 'hd':
|
584
|
583
|
constraints.video.mandatory.minWidth = 1280;
|
585
|
584
|
constraints.video.mandatory.minHeight = 720;
|
586
|
|
- constraints.video.optional.push({ minAspectRatio: 1.77 });
|
587
|
585
|
break;
|
588
|
586
|
case '360':
|
589
|
587
|
constraints.video.mandatory.minWidth = 640;
|
590
|
588
|
constraints.video.mandatory.minHeight = 360;
|
591
|
|
- constraints.video.optional.push({ minAspectRatio: 1.77 });
|
592
|
589
|
break;
|
593
|
590
|
case '180':
|
594
|
591
|
constraints.video.mandatory.minWidth = 320;
|
595
|
592
|
constraints.video.mandatory.minHeight = 180;
|
596
|
|
- constraints.video.optional.push({ minAspectRatio: 1.77 });
|
597
|
593
|
break;
|
598
|
594
|
// 4:3
|
599
|
595
|
case '960':
|
|
@@ -617,6 +613,10 @@ function getUserMediaWithConstraints(um, success_callback, failure_callback, res
|
617
|
613
|
}
|
618
|
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
|
621
|
if (bandwidth) { // doesn't work currently, see webrtc issue 1846
|
622
|
622
|
if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true
|