quaggaJS
quaggaJS copied to clipboard
QuaggaJs Barcodescanner error in iOS safari WebApp
I am developing a webApp using Angular framework. I have used QuaggaJs barcode scanner for one of my module. Its works great on android chrome browser and it's webApp. And iOS safari browser. however while opening it through iOS Safari webApp, it crashes and gives the below error.
[Error] ERROR – Error: Uncaught (in promise): TypeError: undefined is not an object (evaluating 'k.inputStream.type')
i hope anyone has come through this or a fix here .
This is my config object { numOfWorkers: 4, locate: true, inputStream: { name: "Live", type: "LiveStream", target: this.barcode.nativeElement, constraints: { width: 640, height: 480, aspectRatio: { min: 1, max: 100 }, facingMode: "environment" }, area: { // defines rectangle of the detection/localization area top: "25%", // top offset right: "0%", // right offset left: "0%", // left offset bottom: "25%" // bottom offset }, singleChannel: false // true: only the red color-channel is read }, frequency: 10, decoder:{ readers: [ "code_128_reader", "ean_reader", "ean_8_reader", "code_39_reader", "code_39_vin_reader", "codabar_reader", "upc_reader", "upc_e_reader", "i2of5_reader" ], debug: { drawBoundingBox: false, showFrequency: false, drawScanline: false, showPattern: false }, multiple: false }, locator: { halfSample: true, patchSize: "medium", // x-small, small, medium, large, x-large debug: { showCanvas: false, showPatches: false, showFoundPatches: false, showSkeleton: false, showLabels: false, showPatchLabels: false, showRemainingPatchLabels: false, boxFromPatches: { showTransformed: false, showTransformedBox: false, showBB: false } } }, debug: false, }
Someone please correct me if I'm wrong, but I believe that iOS doesn't provide access to the camera from webview in applications.
https://caniuse.com/#feat=webworkers,canvas,typedarrays,bloburls,blobbuilder,stream
As per the above link. getUserMedia/Stream API supports for iOS Safari 11.2, 11.4, 12, Which it gladly does. However there is no any specific information about support for iOS Safari Progressive Web Apps. And my application crashes with the above mentioned error while i try to go liveStream through Quagga barcode scanner, which needs access to camera indeed.
It does work in browser but not in webapp (standalone app). I presume it does not work in webview either. It is a ios thing.
I have been having the same issue.
IOS works in webview from https
I don't have an iOS device, so I'm no help in tracking that down. Thanks for confirming that it does work, though @andreglegg .
@PrItHvI7 are you sure this isn't an error somewhere where you're handling the object? I'm not seeing anything in the source code, or build, "k.inputStream".
So even I use https it won’t work with PWA in standalone mode only using safari as common browser? What about Android in stand-alone mode in PWA?
Works pwa and standalone on android. But safari ios pwa is about to be fixed. Works for me in 13.4 beta . !!
Le dim. 23 févr. 2020 à 22:22, Lukasz-Chowaniec [email protected] a écrit :
So even I use https it won’t work with PWA in standalone mode only using safari as common browser? What about Android in stand-alone mode in PWA?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/serratus/quaggaJS/issues/324?email_source=notifications&email_token=AAY42EWTOP3PAMDIXO7U2JDRELSI7A5CNFSM4FRM5IS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMWHXGA#issuecomment-590117784, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAY42EURKHTE7LGEQLS66XDRELSI7ANCNFSM4FRM5ISQ .
Great news! Is this beta release date known?
seems like this tuesday!
Did anyone made it work with type: liveStream in Safari? I can get a clear live view of the camera but the onDetected method doesn't recognise my barcode. Still works in Chrome.
sure, it works fine in all modern safari versions. perhaps problem with configuration or camera selection?