Consider requesting the xr permission before creating the XRSession · Issue #1011 · immersive-web/webxr · GitHub
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

Consider requesting the xr permission before creating the XRSession #1011

Closed
svillar opened this issue Apr 30, 2020 · 1 comment · Fixed by #1012
Closed

Consider requesting the xr permission before creating the XRSession #1011

svillar opened this issue Apr 30, 2020 · 1 comment · Fixed by #1012
Milestone

Comments

@svillar
Copy link
Contributor

svillar commented Apr 30, 2020

The current requestSession() algorithm specifies that the permission request should be done after creating the XRSession.

However I think the permission request algorithm does not have any dependency with the session. We do indeed need access to the XRSession's device, but that was obtained a bit earlier so we don't need the session for that. It's also mentioned that the XRPermissionDescriptor should be

initialized with session, requiredFeatures, and optionalFeatures

but it turns out that it just requires the XRSessionMode not the session itself.

My proposal would be to move the permission request step up and put it just before creating the new XRSession. I believe this fits very well with what's mentioned in the feature dependencies section

This will block the creation of the XRSession if any of the required features are unavailable due to device limitations or in the absence of a clear signal of user intent to expose sensitive information related to the feature.

WDYT?

@Manishearth
Copy link
Contributor

Oh, that's a bug from a previous version of the permissions text.

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

Successfully merging a pull request may close this issue.

2 participants