administrivia icon indicating copy to clipboard operation
administrivia copied to clipboard

Webview within a WebXR session

Open thetuvix opened this issue 3 years ago • 3 comments

/facetoface As more of us as vendors enter The Metaverse™, we should warm up previous discussions around showing

thetuvix avatar Mar 30 '22 22:03 thetuvix

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?

thetuvix avatar Mar 30 '22 22:03 thetuvix

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.

AdaRoseCannon avatar Apr 01 '22 10:04 AdaRoseCannon

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.

RafaelCintron avatar Apr 14 '22 23:04 RafaelCintron