Hey, would be cool to have an option to set the preferred camera (front, back) before calling .takePicture
, so that the native camera app opens on the one selected.
Something along these lines:
var camera = require('FuseJS/Camera');
camera.setPreferredCamera('front'); // ['front'|'back'|'default']
camera.takePicture(640,480).then(function(file)
{
// file is a standard JavaScript File object
// file.path contains the path to the saved image on the device
}).catch(function(e) {
console.log(e);
});
EDIT: On a second thought, passing a parameter to the .takePicture()
function might be better:
var camera = require('FuseJS/Camera');
camera.takePicture(640,480,['front'|'back'|'default']).then(function(file)
{
// file is a standard JavaScript File object
// file.path contains the path to the saved image on the device
}).catch(function(e) {
console.log(e);
});
And on a side note, what would be a good way to make this happen using Uno now?