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

Proposed API doesn't allow content to request XR features #10

Open
asajeffrey opened this issue Jul 10, 2020 · 2 comments
Open

Proposed API doesn't allow content to request XR features #10

asajeffrey opened this issue Jul 10, 2020 · 2 comments

Comments

@asajeffrey
Copy link

The API proposal at https://github.com/immersive-web/navigation#api-proposal is a sessiongranted event that contains a session field. This means that content has no way to control the initialization of the session, and in particular can't request feature (https://immersive-web.github.io/webxr/#feature-dependencies).

@asajeffrey
Copy link
Author

An alternative API is to add a sessionavailable event, which the UA can fire at document load, which the UA uses to signal to the content that there is user intent to enter a session (https://immersive-web.github.io/webxr/#user-intention).

Using the API would look like (following the example in the proposal:

navigator.xr.addEventListener('sessionavailable', (evt) => {
   navigator.xr.requestSession('immersive-vr').then((session) => { ... })
});

@Manishearth
Copy link

Manishearth commented Jul 13, 2020

Note: the spec makes it possible for the permissions API to be used to request features mid-session. However I don't think anyone implements this yet?

Also some features, like layers and secondary views, must be requested at the beginning of the session.

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

No branches or pull requests

2 participants