immersive-web / proposals

Initial proposals for future Immersive Web work (see README)
95 stars 11 forks source link

Define a metadata element to indicate that a page is WebXR ready #24

Closed joshmarinacci closed 5 years ago

joshmarinacci commented 6 years ago

A page author should be able to indicate if there is immersive content in this page. ie: is it 'webxr ready?' This would be similar to how we can detect a mobile ready website by looking for the elements Apple specifies:

https://webkit.org/blog/7929/designing-websites-for-iphone-x/

cvan commented 6 years ago

to my knowledge, at least for WebVR v1.1, Firefox, Chromium/Chrome, Oculus Browser, Samsung Internet, and Edge infer a document is going to potentially enter VR when a WebVR-specific event listener (e.g., window.addEventListener('vrdisplaypresentchange', …)) is defined or navigator.getVRDisplays is called.

this changes for WebXR to be scoped under navigator.xr, but the same idea applies.

to improve the latency in navigation between WebVR to WebVR pages (beyond using Service Workers and clever client/server tricks), there have been proposals by myself, @caseyyee, @digitec, and others to introduce an http-equiv response header / <meta>-tag fallback (à la mobile browsers' usage of <meta name="viewport">).

XR-Content: true
<meta http-equiv="XR-Content" content="true">

or to target the <canvas>:

<meta http-equiv="XR-Content" content="#xr-canvas">

another idea I like is to use the Link header (a good example is in GitHub's API).

ultimately, I like the policy of not requiring the developer to define any <meta> tag or request header, but use Resource Hints or similar for an improved user experience.

cvan commented 6 years ago

also, we should support web-app manifests as a place to define these capabilities: https://github.com/immersive-web/proposals/issues/22#issuecomment-416749744

the browser could prefetch the URLs, cache them, and know which sites are WebXR-ready.

TrevorFSmith commented 5 years ago

I suspect that this topic has been absorbed into the navigation feature repo so I'm going to close it. If you feel that this needs to be a separate conversation ping me and we can re-open it.