zxing-js / browser

ZXing for JS's browser layer with decoding implementations for browser.
MIT License
222 stars 43 forks source link

Improper documentation #50

Open JAlbert2 opened 3 years ago

JAlbert2 commented 3 years ago

When using the decodeFromVideoElement tag, I receive an error about a callback function not being present. Unhandled Promise Rejection: ArgumentException: callbackFn is a required parameter, you cannot capture results without it. The documentation is not clear in how different processes can be used and where they can be interchanged from the master Scan from webcam example.

fydelio commented 3 years ago

For decoding from the webcam, try this. codeReader.decodeFromVideoDevice(this.videoInputDevice, "video", (result, err, controls)