Support for Embeting AR content like USDZ files with Apple Quick Look

AI-generated summary

In a feature request discussion titled “Support for Embedding AR content like USDZ files with Apple Quick Look,” V86 proposes adding support for USDZ (Apple AR) and glTF (Android) file types to Discourse for 3D CAD modeling use cases. Falco confirms that USDZ files can already be embedded on iOS/iPadOS if the .usdz extension is enabled in site settings, and demonstrates it working via HTML with rel="ar". To improve UX, Falco outlines three needed steps: 1) Serve .usdz with correct MIME-type model/vnd.usdz+zip (requires core support), 2) Allow rel="ar" in <a> tags, and 3) Auto-add rel="ar" for .usdz uploads (both 2 and 3 can be implemented via theme components). For cross-platform AR support, Falco suggests packaging the modelviewer.dev web component as a theme component to handle glTF and other formats universally. The discussion highlights partial existing functionality and a clear path toward full AR embedding support.

Today file upload support these file types:
jpg, jpeg, png, gif, pdf, csv, gz, json, svg, mp4, txt, docx, mov, tex, zip, webm, heic, heif)

Is it possible to add USDZ (augmented reality file for Iphone) as a supportet file type? And Embet it with quick look?

…and maby glTF (android)

It comes usefull in a discourse forum for 3D cad modeling.

Testing it with this cool speaker from https://gear.bethesda.net/products/t-51-power-armor-speaker:

The markup:

Uploaded file via composer: [t51-helmet.usdz|attachment](upload://jFx1C6poHlvJtfHUSK4TLCQ1I8P.usdz)
![image|333x500](upload://qQegjCDy8rUuyvmMRaWpXCxSFHz.jpeg)

Linked image with HTML:

<a href="https://meta.discourse.org/uploads/short-url/jFx1C6poHlvJtfHUSK4TLCQ1I8P.usdz">
<img src="https://global.discourse-cdn.com/meta/original/3X/b/c/bc1ff8b759367e3ebc904966a3820743cb3f1c11.jpeg" alt="image" class="resizable" width="333" height="500">
</a>

becomes

Uploaded file via composer: t51-helmet.usdz

Linked image with HTML:

image

Works on my iPad:

So it already kinda works if you enable the usdz extension on your site settings!

To make the user experience our TODOs here would be:

Serve .usdz with the proper MIME-type which is model/vnd.usdz+zip.

Allow list the attribute rel="ar" in a elements.

Auto add rel="ar" for .usdz uploads.

2 and 3 can be hacked using a theme-component, 1 needs core support.

That being said:

Looks like it would be easier to package this web component https://modelviewer.dev/ as a Discouse theme-component and it would be a cross-platform thing for everyone.

5 Likes