serratus/quaggaJS

Switching between livestream and file input

discry opened this issue · 1 comments

Great project. A very useful utility. I hope to help improve it however I can.

I am trying to merge the two examples file_input and livestream so that a user can toggle between their live camera or a file upload. This is primarily because I find that the file input has a much higher success rate - particularly with UPC.

I feel like I'm incurring some conflict or missing something obvious in reconciling the two examples. I have created a CodePen here: https://codepen.io/alxgrlk/pen/PoGRWYY

Any assistance greatly appreciated

a fairly sizeable amount of code to dig through built with frameworks i don't know.. my guess would be it would be easier to write something from scratch that makes an obvious distinction between when you have the livestream running (via Quagga.start and Quagga.stop) and when you're trying to use Quagga.decodeSingle to decode a file.

Might be helpful also to use my fork, which has fixes for issues that prevent using multiple instances of Quagga at the same time. https://github.com/ericblade/quagga2