MIDI.js icon indicating copy to clipboard operation
MIDI.js copied to clipboard

iPhone iOS 9.02 & 9.3.1 both can't work

Open greenSnot opened this issue 9 years ago • 8 comments

In official site,I only heard noise,but work well on my laptop. I have tried mobile safari and mobile chrome(ver 50) which support WebAudio API.

greenSnot avatar May 12 '16 11:05 greenSnot

iOS doesn't support autoplay for the "

greenSnot avatar May 13 '16 05:05 greenSnot

Is there a fix / workaround for this?

hmoffatt avatar Jun 15 '16 07:06 hmoffatt

There were some bugs in Safari on iOS 9.0-9.2. http://www.williammalone.com/posts/ios-9-web-audio-api-safari-mobile-issue/

I modified the examples to only init the audio context after the user presses a button. It seems maybe iOS Safari is trying to stop pages playing automatically. This sort of worked, in that the Basic one note example now works, but the MIDIPlayer example still stutters and makes noise after just a few notes. That might be what @greenSnot is describing.

hmoffatt avatar Jun 16 '16 05:06 hmoffatt

Is there a fix for this? It is a huge issue. I am willing to offer up a bounty to see it fixed.

silverhawk184 avatar Sep 22 '16 13:09 silverhawk184

Which bit exactly @silverhawk184 ?

hmoffatt avatar Sep 23 '16 00:09 hmoffatt

If you test on an IOS device (iPhone 6s+ v9.3.3) (the pirate tuna example) all the notes turn into a jumbled mess of pink noise within a few seconds. Then if you press pause, it slowly becomes discernible again before it stops.

silverhawk184 avatar Sep 23 '16 02:09 silverhawk184

Yes, the scheduling of all the WebAudio sources far in to the future (potentially 1000 nodes) is killing the iPad. That's a different issue that this one though which is that iOS Safari won't let you make any sound except in response to a user event.

hmoffatt avatar Sep 23 '16 02:09 hmoffatt

Correct, but as posts #1 references the "noise", it is the cause of the issue being filed. It was then followed up with the autoplay issue.

silverhawk184 avatar Sep 23 '16 03:09 silverhawk184