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
Open immersive experiences directly #1171
base: main
Are you sure you want to change the base?
Conversation
This PR can be tested from the command line with: adb shell am start -n "com.igalia.wolvic/com.igalia.wolvic.VRBrowserActivity" \
-a android.intent.action.MAIN \
-c android.intent.category.LAUNCHER \
-a android.intent.action.VIEW \
-d "https://heyvr.io/arcade/games/barista-express" \
--ez open_in_immersive true \
--ez hide_webxr_interstitial true \
-e open_in_immersive_parent_xpath '//*[@id="game-frame"]' \
-e open_in_immersive_element_xpath '/html/body/a-scene/div[2]/button' |
This PR implements support for opening immersive experiences directly as soon as the application is launched. We do this by adding a built-in extension which will activate a particular element in the page. We need to set the preference dom.vr.require-gesture to false so this script can launch immersive WebXR experiences. The information required to identify the element to activate is passed as parameters to the Intent: - open_in_immersive - open_in_immersive_parent_xpath - open_in_immersive_element_xpath - a target URL to open
15751a8
to
9f956d4
Compare
I have updated the PR so that it uses the XPath of the parent element, which is a more flexible solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I told @felipeerias about this in private, but I'll add it here for everybody interested to know. The idea of using an extension is nice, but the problem is that the Chromium backend won't have extensions support initially as it's a lot of work. So provided that we don't have a solution at the moment I'd prioritize one that does not involve extensions.
That said I agree that having an extension that inspects the DOM is likely the best we could do, so I indeed have mixed feelings.
This PR implements support for opening immersive experiences directly as soon as the application is launched.
We do this by adding a built-in extension which will activate a particular element in the page.
We need to set the preference dom.vr.require-gesture to false so this script can launch immersive WebXR experiences.
The information required to identify the element to activate is passed as parameters to the Intent: