New games every week!
Hello..!?!? Blog
15th February 2019
Basic audio is added, but refuses to work on an iOS device.

Can you hear me!?!

-=-=-

I've added really basic audio to the Shoebox, but annoyingly the audio doesn't seem to be working on iOS.
This is the very same issue I'm having with Emscripten's HTML output, and it's really frustrating that this is happening..
.. Twice!!

The method

You're supposed to wait for the user to interact with the screen, THEN unlock the audio API.
And I'm doing that, and the API's returning a success...
audioCtx.state = "running"

So, as far as I can tell, all should be good to go.

And yet, I'm still getting the "NotAllowedError" rejection whenever I try to play a sound.

Really quite baffling.

Hmmm..


Views 117, Upvotes 21  
Gpsog , Shoebox
New games every week!
Site credits : Site built from the ground up, in php, using Programmer's Notepad 2, and a very bored Jayenkai.
(c) Jayenkai 2023 and onwards, RSS feed 91

Blog - Hello..!?!? - AGameAWeek