4 ms·
There’s also the experimental https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Detection_API https://developer.mozilla.org/en-US/docs/Web/API/Barcode_De
by admp 3y ago
There’s also the experimental https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Detection_API https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Det... — already live in Chrome.
- jauntywundrkind 3y agoI really wish mdn samples showed output. As is semi-typical, the examples show console.log of the results, but no sample output is provided. I'm mainly curious whether position information is provided, and whether or not multiple barcodes can be detected at once. Digging further I see the output is an array and cornerPoints are provided, but i keep feeling like these samples only show 50% of what I want to see.
- admp 3y agoI like to look at API specs to clear questions like this, e.g. https://wicg.github.io/shape-detection-api/#barcode-detection-api https://wicg.github.io/shape-detection-api/#barcode-detectio... BarcodeDetector#detect returns a sequence of detected barcodes, so depending on the implementation and input quality it should able to extract multiple barcodes. https://wicg.github.io/shape-detection-api/#dictdef-detectedbarcode https://wicg.github.io/shape-detection-api/#dictdef-detected... each DetectedBarcode has boundingBox/cornerPoints.
- deleted 3y ago[deleted]
- mgbmtl 3y agoThis would be awesome. I wish it at least worked on Safari iOS. (Firefox seems unlikely: https://bugzilla.mozilla.org/show_bug.cgi?id=1553738 https://bugzilla.mozilla.org/show_bug.cgi?id=1553738) We have a web app that does QR scanning for event badges, using a JS library, but it's painfully slow compared to the camera app.