Affects Version/s: None
Fix Version/s: None
run code locally:
first reader will initialize the library and run scans
2nd reader will not have listeners active from library
both reader should be active
this if statement will prevents components to register a reader for themselves if the library was already used in a different component.
At the moment, quagga supports multiple callbacks on same reader, zxing doesn't.
In both cases, only the first barcodereader is allowed to register listeners on the reader object.
This means that if a page adds a reader (in a modal window, or in a template with multiple sources) then removes it, and adds another instance of reader,: only the first reader will actually receive JS library events
Abstraction layers initialize the library once per page, only let the first component actually register a listener