Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
769 stars 98 forks source link

Opening a WebXR experience from another app #450

Open Arvide opened 1 year ago

Arvide commented 1 year ago

Is it possible to via an intent launch a WebXR experience in Wolvic in full screen (force webxr 360 view) without having to load the url first?

What we're trying to do is to seamlessly launch a WebXR experience from launcher app and then seamlessly bring the user back to the launcher after completing the WebXR experience.

Arvide commented 1 year ago

This if on Meta Quest 2 and Pico Neo 3Pro and Pico Neo 4e hardware

svillar commented 1 year ago

It's not possible right now. You can use an intent to launch wolvic with a given URL but not in immersive mode.

svillar commented 1 year ago

Just for clarification, the problem of launching immersive WebXR experiences is that there is no standard way to do that. Most of the experiences use an "Enter VR" button. But that button is different on each experience, and it's something that is under the control of the WebPage. So there is no way for Wolvic to know how a particular experience should be launched.

There are things that could be done though, for example if we make the assumption that every experience has a button that must be clicked to enter the experience, then we could add some code to Wolvic that could process a couple of web page coordinates specified in an android intent, and simulate a user click on that button. I think that could be done. Would that solve your problem in your use case?

Arvide commented 1 year ago

Thank you! Yes, that would indeed solve the problem.

Is that something you can be talked into adding?

svillar commented 1 year ago

Thank you! Yes, that would indeed solve the problem.

Is that something you can be talked into adding?

It isn't a priority right now, but we could consider that for the future indeed (or if it becomes a priority for any of our partners)

Arvide commented 1 year ago

Thank you!

msub2 commented 1 year ago

Also worth considering the proposed WebXR navigation spec, where an experience listens for a sessiongranted event to automatically launch an immersive experience without the need for explicit user activation on the page

svillar commented 1 year ago

Also worth considering the proposed WebXR navigation spec, where an experience listens for a sessiongranted event to automatically launch an immersive experience without the need for explicit user activation on the page

Right we're following that development as well, but it'll take some time to land (if ever) and it isn't going to be likely implemented in Gecko.