kaboom icon indicating copy to clipboard operation
kaboom copied to clipboard

Audiobuffer constructor bug on iOS 14

Open ColinTravis opened this issue 3 years ago • 1 comments

Version

v2000.2

Safari

Hi there, first this library is amazing. So many great built-in helpers and features for making quick games.

I've got a basic game running on a site, and it works great across browsers, however I'm noticing an error if I load it in Safari on anything below iOS 15. The app crashes with a:

TypeError: function is not a constructor (evaluating 'new AudioBuffer({length:1,numberOfChannels:1,sampleRate:44100})')

Currently, I'm not using any audio at all. In fact, this happens just on the initial map load. It does work great on iOS15, however.

ColinTravis avatar Jun 17 '22 22:06 ColinTravis

Does the game crash with just one call of kaboom()? Weird looks like AudioBuffer is supported since iOS 6.1, maybe we can try change new AudioBuffer to AudioCtx.createBuffer.

Can you check what does console.log(AudioBuffer) give?

slmjkdbtl avatar Oct 04 '22 09:10 slmjkdbtl