|
|
@@ -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,8 @@ function getUserMediaWithConstraints(um, success_callback, failure_callback, res
|
|
617
|
613
|
}
|
|
618
|
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
|
619
|
if (bandwidth) { // doesn't work currently, see webrtc issue 1846
|
|
622
|
620
|
if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true
|