The Shape Detection API (https://wicg.github.io/shape-detection-api/) defines detectors for faces (https://wicg.github.io/shape-detection-api/#face-detection-api) and barcodes (https://wicg.github.io/shape-detection-api/#barcode-detection-api), both of which are natively supported by the iOS Camera app. This API exposes these OS-level detectors to web applications through straight-forward interfaces. There is a well-documented industry case where native barcode detection would help from eBay: https://medium.com/ebaytech/webassembly-at-ebay-a-real-world-use-case-ef888f38b537.
<rdar://problem/51089129>
I work with SAP customers. Especially the barcode detection is highly requested by small-mid-size businesses who can't hire (expensive) iOS developers. B2B customers need to be able to decode QR and barcodes quickly and reliably in various conditions within their mobile web apps.
What's the progress on this? Really important use cases all round here, and Chrome is now shipping this on Android as of version 100.
For a real world use case of the BarcodeDetector, see https://web.dev/mishipay/. Currently, iOS users are forced on the slow code path that needs to download the barcode reader implementation, whereas Android users can use their OS built-in barcode reader implementation.
looks like this is available in Safari Technical Preview 176 (perhaps even earlier) behind `Shape Detection API` feature flag. https://github.com/WebKit/standards-positions/issues/174#issuecomment-1539422664 QR scanning worked in main thread, however BarcodeDetector was available in WebWorker but appears unusable.
*** This bug has been marked as a duplicate of bug 255803 ***