Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiveStream mode freezes in webview (android) #497

Open
santycg2002 opened this issue May 4, 2023 · 2 comments
Open

LiveStream mode freezes in webview (android) #497

santycg2002 opened this issue May 4, 2023 · 2 comments

Comments

@santycg2002
Copy link

Hi!

I'm trying Quagga 2 (Javascript) for my web app project (Android/iOS). I have created a simple app with just a webview that shows the web application.

The problem I'm experiencing is that the image from the webcam is 'frozen' unless I touch the screen. No matter where I touch, when I touch the screen, frames are updated, but if not, the image keeps frozen.

Barcodes ARE detected with no problem, but I have to do the trick (touching the screen).

If I open the web application using Chrome browser in the Tablet, all works fine. Live stream is working fine and I don't need to touch the screen to refresh/update the frames.

It is an old tablet (Samsung Galaxy TAB A), but works fine in the Chrome browser. The problem is only in WebView.

Is it a known issue? Something I could try, maybe with different Quagga initialization config parameters (numOfWorkers, frequency, etc.)?

This is my current initialisation code:

Quagga.init({
            inputStream : {
                name : "Live",
                type : "LiveStream",
                constraints:{
                    width:{"min":640},
                    height:{"min":480},
                    aspectRatio:{"min":1,"max":100},
                    facingMode:"environment"},
                target: document.querySelector('#barcode-reader')    // Or '#yourElement' (optional)
            },
            locate:true,
            debug:false,
            locator: {
                patchSize: "medium",
                willReadFrequently: true,
                halfSample: true
            },
            decoder : {
                readers : ["code_128_reader","ean_reader","code_39_reader"],
                multiple: false
            }
        }, function(err) {
            if (err) {
                console.log(err);
                return
            }

            Quagga.start();
        });
@github-actions
Copy link

github-actions bot commented May 4, 2023

Thank you for filing an issue! Please be patient. :-)

@ericblade
Copy link
Owner

hmm. Doesn't sound like something related to Quagga.

Maybe try something like https://webcamtests.com
and see if there's a similar issue?

Looks like the Tab A is quite a few years old, and might've had Android 7 or 8, which I want to say is right around the absolute minimum necessary for camera to work in browser, though my memory could be wrong there. If the internal webview in that version is quite old, it could very well be a problem with that. I'm guessing that doesn't update with the Chrome version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants