[SOLVED] Audio Not Working in Published Web AR (iOS Only)


#1

Greetings,

I’m using a couple of small OGG audio files in my experience, and everything works perfectly when previewing in the desktop app or the Zappar mobile app. However, in the published Web AR experience, there is no sound. The rest of the experience, including all animations, work fine - just no audio.

Should the audio play? Any suggestions?

EDIT: I created a super simple project that does nothing but play a short OGG sound file on “ready”, and I get the same result - no audio whatsoever. Makes me wonder if audio is even supported in WebAR. Anyone?


#2

Are your files in the zap or hosted?

Steve


#3

They are definitely in the project. I dragged them into the project and then into the hierarchy. Then, I dragged them into the code window to get a reference to them, and then invoke the start() method.

FWIW, I’m using an iPhone 7S.

EDIT: I resampled the audio and tried different bit rates as well as WAV format. No luck. :frowning_face: Man, what a bummer after all that work.

EDIT 2: Interesting finding… I created a simple web page containing an <audio> element, and the file plays just fine in Chrome on desktop from my local machine. It does not, however, play in Safari. There’s no console error or anything. It’s just that nothing happens in Safari - no audio and the player doesn’t advance. Makes me wonder if there’s a known issue with Safari on desktop and iOS. :confused:


#4

Do you want to share you zapcode?
I can scan with my S7 and see if I get anything.

Steve


#5

Thanks, Steve. It works fine from the zap code (Zappar mobile app) as well as the desktop app. It’s only the Web AR version launched from the QR code that doesn’t work (no audio).

As soon as the experience loads, you should hear a few seconds of what sounds like a low rumble + static. (It’s a rocket engine.)

Anyway, here are both codes…


 
 
 

I’m eager to learn if it works on your Android device! Thanks again! :slightly_smiling_face:


#6

Sorry had to step out for a call.

So I get sound with both WebAR and Zappar app.
So when you first opened the WebAR did you get a security permissions for sound?
Maybe checked if there are any you can edit.

ok what is that a car or jet?

Steve


#7

No worries. Thanks for taking the time.

Good to know! Thanks for testing.

No, not for sound - only for camera and orientation. Seems odd, though, that permissions would even be needed just to play audio. (I could understand for recording audio.)

Yeah, did that already. None that I could discover.

I do have Chrome installed on my phone but can’t test with it because WebAR requires Safari. Zappar prompts to launch Safari when the Zappar URL is visited with Chrome.

At this point, I’m tempted to report it as an issue, but I’m not sure about the proper channel. Is there an official bug report form for Zappar?

If someone else with an iPhone reads this post, please try the QR code if you can. It’d be good to get some corroboration before I report it.

It’s quite literally a rocket (from the Apollo 11 mission).

Thanks again for your help!


#8

I found this on another post HERE

Look for the speaker icon on top.

Steve


#9

I have no speaker icon at the top. Of course, that post references a video, and my issue is with an audio file. I did try the &_mute=0 query string parameter to no avail. Thanks for the pointer though. I guess I’ll keep digging and experimenting.

EDIT: @George, are you aware of any audio issues with Web AR but only on iOS? Not sure what to try next.


#10

You can email them at support@zappar.com as well.

Steve


#11

Ah ok, will do.

Just learned something significant…

The audio won’t even play when clicking the play button in Studio on a Mac, but it works fine in Windows!


#12

You know I have never got that to work on PC studio for me.

Steve


#14

Even more strange, I’m running Win10 on my Mac, and it works under Windows but not on Mac. Go figure. :question: :face_with_raised_eyebrow:


#15

Thanks to @George, this issue has been resolved!

I’m somewhat embarrassed to admit that it was simply due to my phone being “silenced”. There’s a physical switch on the device, which is intended primarily as a convenient way to temporarily silence it (such as during meetings, at the library, etc.) I have my device silenced ALL the time, and it’s been that way for years, ever since I got it. (I hate drawing attention to myself with audible alarms, ring tones, and notifications. I rely entirely on haptics and have set up numerous custom vibrations.)

It turns out the Zappar mobile app overrides that switch when playing audio, as does Safari - but only when user interaction triggers the sound (such as playing videos etc.) If audio attempts to play without the user explicitly triggering it, as is the case with my WebAR experience - Safari honors the “silenced” setting.

Anyway, thanks again, @George, and sorry you had to spend time sleuthing this out, but at least now we’re all the wiser! :smile:


#16

:joy::rofl::joy::rofl:

And I was going to ask if your volume was down or off.
I just didn’t want to sound rude. LOL

Steve


#17

And the sad part is that it still wouldn’t have tipped me off to the problem, as the volume was in fact up, as I use the device all the time to watch videos, etc. This is apparently the first time since I got the device that audio has attempted to play via the browser without it having been explicitly triggered. :blush:


#18

It’s a new one on me too - we use the tap on “launch” to prepare a video so we can get audio on those, and we also start the web audio context then too which gets used for oggs and the like. Safari must have different rules about whether they respect the mute switch. Good sleuthing everyone!


#19

In case anyone is looking for a short term solution before the Safari mute switch is taken care of I found a way around. I had two videos in my experience, one played audio regardless of the Safari mute switch and one which respected it. I converted the second video into the exact audio settings of the first. More specifically, I set the Bit Rate to 64kbps, Channels to 2 (stereo), and audio sample rate to 48.000 kHz. Once I did this, the audio would play regardless of the mute switch. Hope this helps someone!


#20

Thanks for the great tip! Did you use WAV or OGG audio file format?