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

This code doesn't work on mobile browser on next.ts application. #12

Open
Mikhail-Chernyshev opened this issue Mar 29, 2024 · 1 comment

Comments

@Mikhail-Chernyshev
Copy link

This code doesn't work on mobile browser on next.ts application.
At the same time, everything works correctly on the desktop, the camera opens and scans. But in a mobile browser, after clicking on opening the camera, the browser does not even ask for access to the camera.

Then I checked how it would work in a separate example with the implementation of qr scanner in a simple react application. And everything worked.

Moreover, my code is in my next.The application js is the same as in the react example.

How to fix this so that the scanner works in my next.js application? So far, I have not been able to find an answer to this question. I hope for your help.

@Mikhail-Chernyshev
Copy link
Author

Oh, I found a solution. The problem was that the site on which I deployed the application was without a security certificate and had the http type instead of the preferred https, which is why the devices blocked access to any devices.

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

1 participant