Selecting camera based on facingMode; Relates to #128

This commit is contained in:
Christoph Oberhofer
2016-10-03 18:21:43 +02:00
parent 2c45929800
commit 473f4366a5
2 changed files with 49 additions and 9 deletions
+7 -6
View File
@@ -97,9 +97,9 @@ $(function() {
constraints: function(value){
var values = value.split('x');
return {
width: parseInt(values[0]),
height: parseInt(values[1])
}
width: {min: parseInt(values[0])},
height: {min: parseInt(values[1])}
};
}
},
numOfWorkers: function(value) {
@@ -128,9 +128,10 @@ $(function() {
inputStream: {
type : "LiveStream",
constraints: {
width: 640,
height: 480,
facingMode: "environment"
width: {min: 640},
height: {min: 480},
facingMode: "environment",
aspectRatio: {min: 1, max: 2}
}
},
locator: {