web audio api

When I start the app in iOS 13.X, the Audio Context starts in a state of “suspended”.

after the user clicked the “play” button (which has ‘onclick’ or ‘touchend’ event to trigger the context.resume() and wait until resolved), the audio context state turning into ‘running’.

Then I use the method ‘createMediaElementSource’ and provide the HTML audio element and connect the source to the context.destination, but it doesn’t make any difference, because the audio fails to put out any sound.

However, in iOS 12.X it works, so I can assume that the nodes connected properly.


Is there something else i should do to make it work on iOS 13?

Thanks in advance.

Replies

Same issue here. WebAudio is broken in our web app after updating to iOS13 with no clue of what might be causing this problem.

This is an old issue, but I recently saw this issue reported, with a test case. In that instance, the mute switch was enabled, which controls audio regardless of volume.


It's possible this behavior changed between iOS 12 and iOS 13, and iOS is now honoring the mute switch.