I am having trouble getting custom sounds I added to my game (Livingstone, alpha) to play on iPad / iOS. I can hear them on Windows or Android. I hear other game custom sounds on my iPad (e.g. Parks, alpha), so I am guessing I am missing something in my implementation.
I am seeing a DOMException NotSupportedError where I think the custom sound is being played. I am guessing maybe playSound() isn't choosing the MP3 file to play and is instead trying to play the OGG file, which doesn't work on iPad?
Any tips or hints folks might have (e.g. you don't use BGA playSound() and rolled your own audio playback instead?) would be much appreciated.
***************************
Example code:
TPL file:
<audio id="audiosrc_livingstone_hammeronrock" src="{GAMETHEMEURL}img/livinstone_hammeronrock.mp3" preload="none" autobuffer></audio>
<audio id="audiosrc_o_livingstone_hammeronrock" src="{GAMETHEMEURL}img/livingstone_hammeronrock.ogg" preload="none" autobuffer></audio>
JS file:
playSound('livingstone_hammeronrock');
***************************
Game: Livingstone (Alpha)
iPad with iOS: 17.7.2
Google Chrome: 120.0.6099.119
I am seeing a DOMException NotSupportedError where I think the custom sound is being played. I am guessing maybe playSound() isn't choosing the MP3 file to play and is instead trying to play the OGG file, which doesn't work on iPad?
Any tips or hints folks might have (e.g. you don't use BGA playSound() and rolled your own audio playback instead?) would be much appreciated.
***************************
Example code:
TPL file:
<audio id="audiosrc_livingstone_hammeronrock" src="{GAMETHEMEURL}img/livinstone_hammeronrock.mp3" preload="none" autobuffer></audio>
<audio id="audiosrc_o_livingstone_hammeronrock" src="{GAMETHEMEURL}img/livingstone_hammeronrock.ogg" preload="none" autobuffer></audio>
JS file:
playSound('livingstone_hammeronrock');
***************************
Game: Livingstone (Alpha)
iPad with iOS: 17.7.2
Google Chrome: 120.0.6099.119