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

Webview within a WebXR session #185

Open
thetuvix opened this issue Mar 30, 2022 · 3 comments
Open

Webview within a WebXR session #185

thetuvix opened this issue Mar 30, 2022 · 3 comments

Comments

@thetuvix
Copy link

/facetoface As more of us as vendors enter The Metaverse™, we should warm up previous discussions around showing <iframe> web content within a WebXR session.

@thetuvix
Copy link
Author

The slides @NellWaliczek's team presented about this back in 2018: https://www.w3.org/2018/10/iwwg-tpac-slides/2d.pdf

Some specific questions here:

  • Any progress on making DOM to Texture safe?
  • Could WebXR DOM Layers work here?
  • Do things like fenced frames help?

@AdaRoseCannon
Copy link
Member

I know it's a technical and security nightmare but it would be very fun if an iframe web site could start it's own session and the two sessions get smashed together.

@RafaelCintron
Copy link

In my view, there are two main ways to solve this problem.

  1. IFrame Textures. Developers use the WEBGL_texture_source_iframe or similar extension to draw an iframe into a WebGL texture and subsequently use the texture in their WebXR scene.
  • (Pro) Web developers have the freedom to draw the iframe content in the world however they wish: on a sphere, quad, piece of cloth fluttering in the wind, whatever.
  • (Con) All resources loaded by the iframe must have restrictions discussed in the Origin Restrictions section of the WebGL spec. If elements such as image, video and others are required to have these restrictions today, iframes containing them must also have the same restriction. This drawback was one reason the WebGL_texture_source_iframe extension was not broadly adopted.
  1. DOM Layers. In this approach, WebXR developers use the WebXR layers API to add a new kind of layer that is navigated to an iframe.
  • (Good) Since the web contents are drawn by the browser itself and can never be read by a WebGL shader, no origin restrictions are necessary.
  • (Bad) Developers will be limited by the draw order of the DOM layer with respect to other layers. Might be tricky to draw things in front or behind iframe layers.

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

3 participants