Giter Club home page Giter Club logo

Comments (22)

mrdoob avatar mrdoob commented on May 21, 2024 3

To enable xr to an iframe the attribute is now xr-spatial-tracking:

<iframe allow="xr-spatial-tracking"></iframe>

This only needs to be done when the embedded page is not from the same domain.

from webxr.

cvan avatar cvan commented on May 21, 2024 1

What's the suggested alternative to <iframe allowvr>? The WHATWG HTML5 Living Standard seems to (still?) allow the allowfullscreen, allowpaymentrequest, and allowusermedia attributes on <iframe>s.

Is <iframe sandbox="…"> (see this table) the preferred way of sandboxing <iframe>s going forward?

@annevk, do you know of any open GitHub issues or mailing-list discussions you could point us to about rumours of potentially deprecating <iframe allowfullscreen>, etc. in favour of a better solution? Thanks!

from webxr.

toji avatar toji commented on May 21, 2024

As per discussions with the rest of the implementors, we shouldn't pursue the allowvr route for the final WebVR spec, as the allowfullscreen style of permission is something that the web is trying to move away from as a platform.

from webxr.

cvan avatar cvan commented on May 21, 2024

As per discussions with the rest of the implementors, we shouldn't pursue the allowvr route for the final WebVR spec, as the allowfullscreen style of permission is something that the web is trying to move away from as a platform.

I'm cool with this change, and I'm curious: are there other efforts to approach solving this problem? (I'd assume there's something in the WHATWG HTML5 Living Standard docs.)

from webxr.

cvan avatar cvan commented on May 21, 2024

I found https://html.spec.whatwg.org/multipage/browsers.html#nested-browsing-contexts, which seems relevant.

from webxr.

ddorwin avatar ddorwin commented on May 21, 2024

@cvan, see #86 (comment) and subsuquent comments.

@toji, should we reopen this to remove the existing documentation of allowvr? See also the last paragraph of #86 (comment).

from webxr.

toji avatar toji commented on May 21, 2024

I proposed that on our last call, but Microsoft says they intend to implement it temporarily for WebVR 1.1, so we'll want to leave it in that version of the spec. It can be removed from ToT.

from webxr.

ddorwin avatar ddorwin commented on May 21, 2024

@toji, thanks for the update. I worry about leaving such text without a warning to implementers and authors that they (probably) shouldn't implement it or use it, respectively. Does it make sense to add an issue box (or note) for such known or potential breaking changes?

from webxr.

frankolivier avatar frankolivier commented on May 21, 2024

After deliberating this issue internally, we’ve decided to not implement allowvr in Microsoft Edge; we support removing it from WebVR 1.1.

from webxr.

toji avatar toji commented on May 21, 2024

Thanks for the update Frank! I'll put up a pull request for that today.

from webxr.

annevk avatar annevk commented on May 21, 2024

I don't think is anything is being deprecated and things that need to ship soon get an allow* attribute as allowpaymentrequest just got. However, https://github.com/WICG/feature-policy is a likely better solution going forward, but it's not ready yet.

from webxr.

nox avatar nox commented on May 21, 2024

So was this killed or not? If not, why are there still tests in WPT using allowvr?

from webxr.

joshmarinacci avatar joshmarinacci commented on May 21, 2024

I'm also curious. iframes will be needed for a lot of CMS use cases, like Wordpress and Ghost.

from webxr.

blairmacintyre avatar blairmacintyre commented on May 21, 2024

To be fair, they aren't needed for Wordpress and Ghost, but will certainly make it simpler for plugin developers for those platforms. Having just hacked up some Ghost templating, it's trivial to add content to a page without iFrames.

from webxr.

joshmarinacci avatar joshmarinacci commented on May 21, 2024

from webxr.

blairmacintyre avatar blairmacintyre commented on May 21, 2024

Some sites (youtube, twitter, etc) are set up to require the use of iframes to allow their content to be embedded in other pages. That's not a Wordpress/Ghost limitation.

from webxr.

Squareys avatar Squareys commented on May 21, 2024

Embedding VR content in iframes will also be useful for third-party content hosting sites/games platforms like Construct Arcade will eventually be, where the content needs to be isolated from the rest of the page.

As far as I can tell, allowvr is removed from the spec and iframes have the permssion to run VR content always.

from webxr.

blairmacintyre avatar blairmacintyre commented on May 21, 2024

Good point, @Squareys ... I've run into things like this with games and plugins in the past (e.g., I ran a game design class where the students posted their games to a blog page, and Unity freaked out when multiple games were visible at once).

FWIW, I didn't mean to argue against this feature, I mostly meant that we need solid reasons for it. If I re-interpret @joshmarinacci's point to be that Wordpress and Ghost may want to show multiple WebXR content elements at once (because multiple posts are shown at once), then I'm 100% in agreement that this is a critical need. (and, of course, that's probably part of what Josh meant).

from webxr.

joshmarinacci avatar joshmarinacci commented on May 21, 2024

Yeah, I wasn't very clear. Iframes are a great way to encapsulate content and safely share something from one site on another. I expect it will be a very popular way to distribute WebXR content, just as it is common for videos (youtube) and code (codepen).

from webxr.

mikaelwozniak avatar mikaelwozniak commented on May 21, 2024

Thanks @mrdoob , added that property to the iframe tag and it now works well in oculus quest. But not in iOS somehow.

from webxr.

AlexanderChai avatar AlexanderChai commented on May 21, 2024

Does anyone have an experience with AR inside <iframe> on iOS?
I am using XRViewer by Mozilla, <iframe> has the following attributes: allowvr="yes" allow="xr-spatial-tracking;fullscreen;camera"
The connection is HTTPS.

The result: 'xr' not in navigator.
After I explicitly instantiate WebXRPolyfill, xr becomes available, however I still fail to request 'immersive-ar'

Is it possible at all to run AR inside <iframe> on iOS?

from webxr.

blairmacintyre avatar blairmacintyre commented on May 21, 2024

It won't work in the WebXR Viewer; because of Apple's restrictions, the injected webxr javascript plugin would have to recognize the iFrame and forward all the events too/from the iframe. It would be useful, yes, and was on "the todo list" ... but then Mozilla laid us all off, so I don't think that work is supported anymore.

from webxr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.