Open Kujako opened 8 years ago
i have the same problem
I have the same problem... https://4d68a3175137e650a3ee240c929c8bd26e8ef3db.googledrive.com/host/0B18k-I2MKH8PdXppRkRfVWdJT0k/job/ this page's example is work now(via iPhone)
The linked page appears to be the old "job.js" version and not the new 1.6.1 build, which uses "BarcodeReader.js" and "barcode-reaser.jquery.js".
Can any one tell me what has to be done to work with current version 1.6.1 build? I have been trying to use this library in my project but there are always some problem which were already mentioned in above post.
1) Jquery reference missing 2) require() is undefined. 3) "Uncaught ReferenceError: BarcodeReader is not defined" at line 45 in "barcode-reader.jquery.js"
@Kujako : Can you please suggest me what can be the proabable solution?
like .
@jkumawat Sorry, wasn't able to find a work around. Waiting for another update before I return to this project.
I have got these errors too ...
i Trying to replay this example https://4d68a3175137e650a3ee240c929c8bd26e8ef3db.googledrive.com/host/0B18k-I2MKH8PdXppRkRfVWdJT0k/job/ but still have the problem, could you help me please. the problem its the same that the first after uploading the image does nothing @modeverv
This what I did to work around jquery/require/uncaughtReference by tweaking plugin js:
I tried to define require() before loading BarcodeReader.js but because exif.js is loaded async, BarcodeReader still complains root is undefined. Though it is NOT a good practice to tweak plugin code, it is worth doing that in my case because this js BarcodeReader seems better than QuaggaJS(https://serratus.github.io/quaggaJS/) with low quality image from my testing (except that I have align barcode horizontally which is fine for us so far). Hope this helps.
@tsalufe like this?
// var EXIF = require('./exif');
// var decoderWorkerBlobString = require('./DecoderWorker');
<script src="exif.js"></script>
<script src="js/DecoderWorker.js"></script>
var BarcodeReader = {
.
.
.
}
@CDIDEV Correct but BarcodeReader is a class already defined in BarcodeReader.js. You just need to load BarcodeReader.js. See src/Reader.html.
// var EXIF = require('./exif');
// var decoderWorkerBlobString = require('./DecoderWorker');
<script src="exif.js"></script>
<script src="js/DecoderWorker.js"></script>
<script src="js/BarcodeReader.js"></script>
@tsalufe can u tell me how you aligned the image whether you changed any settings or camera position for me sometimes this detecting the barcode and some times its not working can u help me
@dhana6795 I normally align it horizontally. Move your camera closer or only process cropped barcode out of large image might help.
@tsalufe thank you..
Trying to review the changes in 1.6.1, however the Reader.html in the src folder fails to load, throwing various javascript errors. Main problem was that jQuery wasn't loaded, but after adding a call to it in the head I am still seeing....
"Uncaught ReferenceError: BarcodeReader is not defined" at line 45 in "barcode-reader.jquery.js"
I've tried a few things, but seem unable to diagnose the problem. Any assistance would be appreciated.