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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃挱 Failed to initialize VisionCamera: VisionCamera currently does not work on web. #2711

Closed
4 tasks done
ajesses opened this issue Apr 3, 2024 · 2 comments
Closed
4 tasks done
Labels
馃挱 question Further information is requested

Comments

@ajesses
Copy link

ajesses commented Apr 3, 2024

Question

image
when open on the web. There is a error! The Error: Failed to initialize VisionCamera: VisionCamera currently does not work on web.

It appears to initialize VisionCamera in the web environment as well.

How to resolve, or How to do without initializing VisionCamera in a web environment?

What I tried

image
I try to use Platform API to resolve it, but it don't work

VisionCamera Version

^3.9.2

Additional information

@ajesses ajesses added the 馃挱 question Further information is requested label Apr 3, 2024
@willsunnn
Copy link

I'm also facing this issue, and currently the only workaround I can think of is using JS dynamic imports to try catch loading the module.

If the package could at least provide a No-op VisionCamera implementation for web that returns null devices or fails on call rather than on import, that could be a potential temporary solution.

@mrousavy
Copy link
Owner

As the error message states, VisionCamera does not work on Web.

I am not using Web myself, so I've never seen that error before.

For Web, you should use web camera APIs instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃挱 question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants