Library: Pass hints to constructor client side

Created on 2 Jul 2019  路  2Comments  路  Source: zxing-js/library

Hi, how can we pass hints to a BrowserMultiFormatReader constructor being called from client side JS?

The below doesn't work as it can't find DecodeHintType.
Since it's running client side import/require don't work.

I'm making use of the index.min.js script to run the scanners.

I need the FNC1 group separators to be included in the scan to process the information.

   var hints = new Map();
   hints.set(DecodeHintType.ASSUME_GS1, true)

   const codeReader = new ZXing.BrowserMultiFormatReader(hints)
   window.addEventListener('load', scanSetup()) 

Thanks in advance for the help.

question

All 2 comments

ZXing.DecodeHintType.ASSUME_GS1

The other things are correct as I see.

Ah... so obvious. Thanks very much.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hopingocean picture Hopingocean  路  3Comments

helloo0-0oword picture helloo0-0oword  路  8Comments

Mazecreator picture Mazecreator  路  10Comments

michael-pearson picture michael-pearson  路  6Comments

sethusuryateja picture sethusuryateja  路  6Comments