Closed dmarcos closed 5 years ago
Thank you for putting this together and getting the conversation started.
Overall I agree with the approach, though I'm slightly more in favor of option 2
:
sessiongranted
is a vehicle for carrying over the context of the existing session (such as VR/AR mode, or permissions), which would be useful context for the target page to use -- for example to skip permisson UIvrdisplayactivate
, which frameworks are designed to handle, so it would be a simpler loading architecture updateI'm in favor of the sessionGranted
event. I've been a proponent of supporting UA-driven methods for entering/exiting XR mode (in addition to page initiated actions) and this aligns well with that.
I would add to your items that we should carefully consider the impact of same-origin vs cross-origin permissions and guidance to implementers. If I'm at a URL and follow a link to the same origin (bmaci.me/cool-webxr-thing1/mode1 -> bmaci.me/cool-webxr-thing1/variation2) the security is different then if I navigate to (diegossite.fun/xrgame)
@blairmacintyre Thanks. Sorry, I forgot to add the use cases you mentioned in the other issue. Edited above to include them. Let me know if there's any other scenarios we should cover.
I think it would be good to actually create a draft doc, if you’re up for it, where we can all comment on specifics. I don’t really want to have another long discussion thread here!
It’s pretty clear that there are some things we might all agree on, and some things that will be contentious.
Thanks a lot for putting this together @dmarcos!
I definitely think sessionGranted
is the way to go, and I think it's a good name as well. I agree we should mention security concerns and possible solutions, but that a specific suggestion is out of scope.
I also remember from previous conversations the idea of a meta
tag and/or HTTP Response Header. Browser vendors will be able to address this better, but could those optional add-ons improve performance? It does take a while to load and parse JavaScript, even more with WebXR where we probably have other libraries like Three.JS/Babylon.js/Polyfills.
I agree with @blairmacintyre that we should move this to a PR where we can comment on it better. Maybe as an update to the navigation explainer? And maybe a separate PR with the specific change to the WebXR API? Let me know what I can help with
@AlbertoElias I meant a PR on a document in this repo; it's premature to move things to the main repos until we sort out here what we can agree on!
So, create explainer.md
here with the proposal and submit as a PR against this repo. Could have multiple files (e.g., one that is "things that will go to navigation explainer" and one about API./)
Heck, we could just copy the navigation explainer here and then do a PR against it, here.
Yup, that's what I meant, in this repo, but maybe based on those documents
To confirm what was clearly discussed earlier :
If my browser window was in fullscreen then it remains so.
That is incorrect. If you browser was in full screen, it would exit and go back to non-fullscreen mode upon a navigation
If you browser was in full screen, it would exit and go back to non-fullscreen mode upon a navigation
Does it? I just tried with latest Firefox, Chrome and Edge. I press F11, navigate from one link to another and remain in fullscreen. Am I doing it wrong?
If you browser was in full screen, it would exit and go back to non-fullscreen mode upon a navigation
Does it? I just tried with latest Firefox, Chrome and Edge. I press F11, navigate from one link to another and remain in fullscreen. Am I doing it wrong?
There are different types of full screen :-) If you use the full screen API (ie full screen YouTube), it will exit that mode upon navigation If you make the browser itself fullscreen, notice how you can still see the url bar and navigation buttons.
WebXR is currently defined like the former
Well I think the behavior of actively entering VR or immersive mode is equivalent to pressing F11. If I consciously enable it I don't expect it to revert without me actively disabling it.
Continuing discussion in PR as requested https://github.com/immersive-web/navigation/pull/2
Looking forward to your feedback.
Follow up of https://github.com/immersive-web/webxr/issues/517. I would like to propose a simple minimal mechanism for UAs to grant permission to enter immersive mode. This enables in-vr navigation, allowing VR and AR content to interlink other immersive content and for UAs to implement seamless transitions. Some of the valuable use cases previously discussed:
To enable previous scenarios I can think of two different spec approaches:
Implicit, without any additional API. The spec could describe scenarios where entering immersive mode is exempt of the user gesture requirement. Like for example a page navigated from another that was already presenting.
sessiongranted
event. UAs can fire an event that explicitly allows content to enter immersive mode. The event handler is not subject to the user gesture requirement. This is how the API could look like:The spec could also include guidelines covering scenarios where user's security and privacy can be compromised. A series of high level recommendations without getting into the specifics on how browsers would work as it's not in the spec scope
e.g: During navigation in immersive mode UAs must guide and keep the user informed at all times. Possible mechanisms are:
I recommend reading @toji explainer for additional context and previous thoughts on the topic.
I'm happy to volunteer to put together a more formal proposal after general agreement.
Ping to participants in previous conversation @AlbertoElias @blairmacintyre @cvan @lincolnfrog @modulesio @rcabanier @klausw @avaer @n5ro @kfarr @disregardfiat @AdaRoseCannon @TrevorFSmith @Artyom17