The recent use of HTML5 to write a webapp with html5+ (plus) barcode control, encountered a problem.
By default
var scan=new plus.barcode.Barcode (' bcid ');//bcid is the ID of the DIV
So directly to sweep any bar code, at this time the recognition rate, two-dimensional code, EAN13 code, such as the recognition speed, code128 code recognition speed is not only slow, but is recognized as EAN8.
Thought is the control does not support, check the information to HTML5 China Federation official website, found that support code128, but also see the same issue of the post, but the reply to the post, there is said that mobile phone does not support, there are said to suggest the type of ....
Conjecture is caused by a problem in which the control's internal barcode type matches the precedence order.
Then manually specify the barcode type code128 to try, as follows:
var filter=[plus.barcode.code128,plus.barcode.ean13]
var scan=new plus.barcode.Barcode (' bcid ', filter);
scan.onmarked=onmarked;
Scan.start ({conserve:true,filename: "_doc/barcode/"});
Fortunately, the modified code is very fast to recognize.
HTML5 Plus Scan Barcode code128 problem