supermedium / moonrider

🌕🏄🏿 Surf the musical road among the stars. Side project built by two people in a few months to demonstrate WebXR.
https://moonrider.xyz
MIT License
581 stars 225 forks source link

Fixing immersive webxr session dialog issue #122

Closed felixtrz closed 3 years ago

felixtrz commented 3 years ago

This is a potential fix for the issue raised by @dmarcos : "You will see the prompt Block / Allow flashing quickly and disappearing. The user doesn't have a chance to click on it to be able to enter VR."

After investigating, it seems to me that the issue here is your custom enterVR button is a link <a, which when clicked will refresh the page, improperly dismissing the immersive webxr session prompt dialog, thus preventing user to approve and enter vr. Changing that element to a <div, or anything else fixed the problem for me. Please test this out and see if it fixes the issue entirely.

dmarcos commented 3 years ago

It works! Awesome thank you for investigating! Super super appreciated. Just deployed the change 🏅

felixtrz commented 3 years ago

happy to help!