4 ms·
Oh dear… looks like my fix during work yesterday was too hasty. I just updated the code, and tested it in Safari with my useragent set for an ipad. Here's the d
by mrcoles 14y ago
Oh dear… looks like my fix during work yesterday was too hasty. I just updated the code, and tested it in Safari with my useragent set for an ipad. Here's the diff:
- var isIos = navigator.userAgent.match(/(iPhone|iPod)/i);
+ var isIos = navigator.userAgent.match(/(iPhone|iPad)/i);
Thanks for letting me know it was still broken!
Unfortunately, as I said above, it will not play the music, but it will still shoot out waveforms from the piano. I spent several hours experimenting with different dataURI settings and then trying falling back to static .wav files. The latter was the most promising, but there was still a huge lag between calling .play() and the sound actually playing. Looks like you still have to rely on actual "apps" to have good sound on iOS. (If someone knows otherwise, please share!)
- notatoad 14y agoI feel your pain. Getting a browser to play audio properly in iOS is pretty much impossible, and it seems like apple has done this intentionally. No more crash though. Cool.