|
@@ -537,7 +537,10 @@ function getUserMediaWithConstraints(um, success_callback, failure_callback, res
|
537
|
537
|
}
|
538
|
538
|
}
|
539
|
539
|
|
540
|
|
- if (resolution && !constraints.video) {
|
|
540
|
+ // Check if we are running on Android device
|
|
541
|
+ var isAndroid = navigator.userAgent.indexOf('Android') != -1;
|
|
542
|
+
|
|
543
|
+ if (resolution && !constraints.video || isAndroid) {
|
541
|
544
|
constraints.video = {mandatory: {}};// same behaviour as true
|
542
|
545
|
}
|
543
|
546
|
// see https://code.google.com/p/chromium/issues/detail?id=143631#c9 for list of supported resolutions
|
|
@@ -580,7 +583,7 @@ function getUserMediaWithConstraints(um, success_callback, failure_callback, res
|
580
|
583
|
constraints.video.mandatory.minHeight = 240;
|
581
|
584
|
break;
|
582
|
585
|
default:
|
583
|
|
- if (navigator.userAgent.indexOf('Android') != -1) {
|
|
586
|
+ if (isAndroid) {
|
584
|
587
|
constraints.video.mandatory.minWidth = 320;
|
585
|
588
|
constraints.video.mandatory.minHeight = 240;
|
586
|
589
|
constraints.video.mandatory.maxFrameRate = 15;
|