4 ms·
Don't open the page with an iPad. It keeps showing js alerts non-stop and you have to kill safari to fix it :)
by medwezys 14y ago
Don't open the page with an iPad. It keeps showing js alerts non-stop and you have to kill safari to fix it :)
- mrcoles 14y agoOops, yeah, I forgot to mention that. iOS is trouble with html5 audio. I tried making fallback audio files, but that was too slow, so I just deleted them. I should add back some support so it doesn't kill safari.
- tomrod 14y agoI came across the same thing. Ouch!
- mrcoles 14y agoOK, I just updated it to not crash the ipad. As a trade off, it won't play sound, but it will still shoot out the waveforms from the bottom of the keyboard (so you can compute the sound in your head and imagine what it should sound like).
- notatoad 14y agoNope, still crashes the iPad.
- mrcoles 14y agoOh 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.