samsam2310 / zbar.wasm

A wasm build of C/C++ ZBar barcode scanning library.
GNU Lesser General Public License v2.1
222 stars 30 forks source link

Demo does not work #6

Closed blakete closed 3 years ago

blakete commented 3 years ago

Tried the demo on mobile, iPhone Safari and Chrome. Neither works. The image frame freezes and never loads. Please fix this!

samsam2310 commented 3 years ago

Hi @blakete

Thanks for your report. It is a known issue.

First of all, This package only includes the feature that parsing barcodes from images. This package is nothing to do with the part which captures the camera.

The problem is in the demo page repo: https://github.com/zbar-wasm/demo/blob/master/src/index.js#L24 I knew that this may have a permission problem in IOS. However, I don't familiar with IOS, neither have an iPhone device to test it. So I will appreciate it if someone has the device and wants to help me fix the demo page. But without that, you can still use this package. Just find another way to capture the iPhone camera from browsers. The reason I didn't include camera capturing is that the web API is changing frequently and I think everyone should be able to choose whatever they want to capture the camera(or even use image or video instead of the camera).

floflo669 commented 3 years ago

Hello I made a pull request to fix that : https://github.com/zbar-wasm/demo/pull/1

samsam2310 commented 3 years ago

@floflo669 Thanks for your help!

@blakete I had deployed the PR version to the current demo page. Could you please help me verify that the PR fixed this issue?

zhanhb commented 3 years ago

I can load the video on chrome/safari on my ios device after this PR is applied.

samsam2310 commented 3 years ago

OK, thanks