Bug 226265
Summary: | Safari iOS ignoring URL fragment parameters when opening USDZ as BLOB in AR QuickLook | ||
---|---|---|---|
Product: | WebKit | Reporter: | Miles <mail> |
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | achristensen, cdumez, dino, mail, smoley, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 14 | ||
Hardware: | iPhone / iPad | ||
OS: | iOS 14 | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=236069 |
Miles
In iOS Safari, when opening an AR QuickLook preview session, it is possible to provide a BLOB as the source USDZ. However, any additional URL fragment parameters appear to be ignored by the QuickLook session.
For example, appending the fragment #allowsContentScaling=0 should prevent the AR model from being scaled by the user. When provided as a URL fragment with a source USDZ URL, this is respected in Quick Look. However, when providing a BLOB as the source, the same parameter is then ignored and the user is able to scale the object.
It appears that this is the same for any of the supported AR QuickLook parameters, including: allowsContentScaling, callToAction, checkoutTitle, checkoutSubtitle, price, applePayButtonType, custom, customHeight, canonicalWebPageURL.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/78761113>
Smoley
Thanks for filing, I am unable to reproduce this issue on the latest iOS 15.4 beta. Are you also seeing this issue on 19E5209h?
Miles
Thanks for looking into.
In fact, for me, the issue has become worse somewhere along the line. I'm not sure which release this degraded between my initial report and now.
But I'm now testing in iOS 15.4 beta, and when I try to generate a USDZ blob and append #allowsContentScaling=0, now AR Quick Look opens the camera view, but the model is never rendered, I just keep seeing the initial loading spinner which never resolves.
When generating a USDZ blob without appending #allowsContentScaling=0, AR QuickLook renders the model fine.
I'm using the Model-Viewer.dev component to open in AR, which in turn leverages three.js to auto generate a USDZ from GLB source.
Demo here:
https://modelviewer-auto-usdz.glitch.me
When 'Fixed Scale' is not selected (does not append allowsContentScaling parameter), USDZ is generated and displays in AR as expected.
When 'Fixed Scale' is selected (does append allowsContentScaling=0), USDZ is not displayed in Quick Look view.
The part in the Model-Viewer code that pertains to this is here:
https://github.com/google/model-viewer/blob/77c1f8aff8fe9d9004672e5bc81b941ea986aa68/packages/model-viewer/src/features/ar.ts#L368
Do you have a working example that you are able to verify is working?
Chris Dumez
(In reply to Miles from comment #3)
> Thanks for looking into.
>
> In fact, for me, the issue has become worse somewhere along the line. I'm
> not sure which release this degraded between my initial report and now.
>
> But I'm now testing in iOS 15.4 beta, and when I try to generate a USDZ blob
> and append #allowsContentScaling=0, now AR Quick Look opens the camera view,
> but the model is never rendered, I just keep seeing the initial loading
> spinner which never resolves.
>
> When generating a USDZ blob without appending #allowsContentScaling=0, AR
> QuickLook renders the model fine.
>
> I'm using the Model-Viewer.dev component to open in AR, which in turn
> leverages three.js to auto generate a USDZ from GLB source.
>
> Demo here:
> https://modelviewer-auto-usdz.glitch.me
>
> When 'Fixed Scale' is not selected (does not append allowsContentScaling
> parameter), USDZ is generated and displays in AR as expected.
>
> When 'Fixed Scale' is selected (does append allowsContentScaling=0), USDZ is
> not displayed in Quick Look view.
>
> The part in the Model-Viewer code that pertains to this is here:
>
> https://github.com/google/model-viewer/blob/
> 77c1f8aff8fe9d9004672e5bc81b941ea986aa68/packages/model-viewer/src/features/
> ar.ts#L368
>
>
> Do you have a working example that you are able to verify is working?
That part sounds like Bug 236069, which I am fixing.
Chris Dumez
(In reply to Chris Dumez from comment #4)
> (In reply to Miles from comment #3)
> > Thanks for looking into.
> >
> > In fact, for me, the issue has become worse somewhere along the line. I'm
> > not sure which release this degraded between my initial report and now.
> >
> > But I'm now testing in iOS 15.4 beta, and when I try to generate a USDZ blob
> > and append #allowsContentScaling=0, now AR Quick Look opens the camera view,
> > but the model is never rendered, I just keep seeing the initial loading
> > spinner which never resolves.
> >
> > When generating a USDZ blob without appending #allowsContentScaling=0, AR
> > QuickLook renders the model fine.
> >
> > I'm using the Model-Viewer.dev component to open in AR, which in turn
> > leverages three.js to auto generate a USDZ from GLB source.
> >
> > Demo here:
> > https://modelviewer-auto-usdz.glitch.me
> >
> > When 'Fixed Scale' is not selected (does not append allowsContentScaling
> > parameter), USDZ is generated and displays in AR as expected.
> >
> > When 'Fixed Scale' is selected (does append allowsContentScaling=0), USDZ is
> > not displayed in Quick Look view.
> >
> > The part in the Model-Viewer code that pertains to this is here:
> >
> > https://github.com/google/model-viewer/blob/
> > 77c1f8aff8fe9d9004672e5bc81b941ea986aa68/packages/model-viewer/src/features/
> > ar.ts#L368
> >
> >
> > Do you have a working example that you are able to verify is working?
>
> That part sounds like Bug 236069, which I am fixing.
The original bug sounds like what I was fixing in (Bug 228923). Since we were generating a new Blob URL when extending its lifetime, the URL would have likely lost its fragment. Sadly, Bug 228923 introduced Bug 236069 which basically caused Blob URLs with fragments not to load. I am hoping though that once the fix for Bug 236069 get committed, it will fix this bug too (Since fragments will remain in the Blob URL and the load will succeed).
Miles
Thanks for the update @Chris
Presuming this fix would be in iOS 15.5?
Any word on a beta timeline?
Thanks
Miles
This issue still exists in iOS 15.5 beta (19F5047e)
Miles
This looks to be resolved in iOS 15.5 beta 4 (19F5070b).
So far I have tested opening USDZ as blob in AR QuickLook along with #allowsContentScaling=0 parameter, and the model does now load and QuickLook does indeed correctly prevent user from scaling the 3D model. Great!
Miles
This was resolved in iOS 15.5 public release. As original reporter of this issue, marking as resolved.