RESOLVED FIXED Bug 226265
Safari iOS ignoring URL fragment parameters when opening USDZ as BLOB in AR QuickLook
https://bugs.webkit.org/show_bug.cgi?id=226265
Summary Safari iOS ignoring URL fragment parameters when opening USDZ as BLOB in AR Q...
Miles
Reported 2021-05-26 06:57:48 PDT
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
Radar WebKit Bug Importer
Comment 1 2021-06-02 06:58:17 PDT
Smoley
Comment 2 2022-02-04 14:48:48 PST
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
Comment 3 2022-02-07 05:23:52 PST
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
Comment 4 2022-03-22 10:22:57 PDT
(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
Comment 5 2022-03-22 10:26:34 PDT
(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
Comment 6 2022-03-24 12:20:13 PDT
Thanks for the update @Chris Presuming this fix would be in iOS 15.5? Any word on a beta timeline? Thanks
Miles
Comment 7 2022-04-12 10:29:26 PDT
This issue still exists in iOS 15.5 beta (19F5047e)
Miles
Comment 8 2022-05-05 01:50:15 PDT
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
Comment 9 2022-06-10 13:19:48 PDT
This was resolved in iOS 15.5 public release. As original reporter of this issue, marking as resolved.
Note You need to log in before you can comment on or make changes to this bug.