google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.84k stars 807 forks source link

Sound doesn't work on IOS only Android #4341

Closed ramzidaher closed 1 year ago

ramzidaher commented 1 year ago

Description

I'm working with AR models and sounds, currently, when you go into AR mode and place the model, the sound plays only in Android, but on IOS it doesn't, I have tried a bunch of things, but didn't work. Is there a solution for this, I tried some JS doesn't seem to work. By the way, I'm using sound= in model viewer. What's weird is that googles AR 3D animals have sounded on IOS and Android! Note I tired Ogg and mp3 for the audio file.

Live Demo

https://spark-model-and-audio.glitch.me

Version

Browser Affected

OS

AR

elalish commented 1 year ago

iOS has no WebXR support so AR is through QuickLook, which is not the browser, so any browser-based sound or customization is lost. The way the animals did it is to make their own USDZ files equivalent to the GLB that contain their own sound and pass that to ios-src. FYI @meshula.