WICG / shape-detection-api

Detection of shapes (faces, QR codes) in images
https://wicg.github.io/shape-detection-api
Other
303 stars 35 forks source link

Resolve with an empty array when barcode detection unsupported #76

Closed reillyeon closed 5 years ago

reillyeon commented 5 years ago

This change modifies the behavior of BarcodeDetector.getSupportedFormats() such that it resolves with an empty array when barcode detection is not supported by the platform, rather than rejecting.

This matches the behavior in Chromium which is based on developer feedback indicating that this makes feature detection easier as otherwise developers must handle rejection and check that the desired format is present in the result.


Preview | Diff