mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-12 21:21:42 +08:00
Selecting camera based on facingMode; Relates to #128
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user