Added an option for camera flash to be on/off/auto during QR code scanning

This commit is contained in:
Woon Tien Jing
2014-12-06 16:58:46 +08:00
parent 889be2cc3a
commit 0b0699f7b4
4 changed files with 25 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ ZBar.prototype = {
if(params.text_title === undefined) params.text_title = "Scan QR Code";
if(params.text_instructions === undefined) params.text_instructions = "Please point your camera at the QR code.";
if(params.camera != "front") params.camera = "back";
if(params.flash != "on" && params.flash != "off") params.flash = "auto";
exec(success, failure, 'CsZBar', 'scan', [params]);
},