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

Problem on run ARCanvas from conditional render #19

Open
rafelis1997 opened this issue Jun 14, 2022 · 3 comments
Open

Problem on run ARCanvas from conditional render #19

rafelis1997 opened this issue Jun 14, 2022 · 3 comments

Comments

@rafelis1997
Copy link

When conditionally crendereing the ARCanvas this message is displayed

And this shows in the console ar.js:133 Uncaught TypeError: Cannot set properties of null (setting 'orientation') at HTMLVideoElement.video.onloadedmetadata (ar.js:133:63)

I think it's related to useMemo, maybe use memo instead could fix it?

@rafelis1997
Copy link
Author

rafelis1997 commented Jun 14, 2022

when changing the device orientation the canvas is corrected and works well, so it's something related with inital state properties

@j-era
Copy link
Contributor

j-era commented Jul 26, 2022

Hi @rafelis1997, thank you! I set up an example using conditional rendering for the arcanvas. Seems to work fine turning it on and off, could you try it out please -> https://codesandbox.io/s/sparkling-tdd-82xrpl?file=/src/index.js. Otherwise I would need more insights in your code. Maybe some issues with starting in landscape or what are yout trying to do?

@rafelis1997
Copy link
Author

@j-era thanks for the response, I will try your solucionado

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