0

I'm developping an angular App. This app need to play audio save in the IndexedDB. So I have saved the arrayBuffer, and when I start the PWA APP, I trnsform immediatlry the arrayBuffer in AudioBuffer. Then When a user click on a button, a create an AudioContext || WebKitAudioCOntext (spécific for iOS) and set the source with the audioBuffer, et start().

No CallBack function or promise. I've read and understood the limitation of iOS. But nothing, no sound on iOS. It work on Safari on mac, on chrome, on android, but not in iPhone.

I've tried many audio library.

I've discover for instance that with pizzitaco.js (https://alemangui.github.io/pizzicato/) the website example work on iPhone Only if you allow the access to the microphone. If you refresh the page and refuse the microphone, no sound...

I'm really frustating against Apple !

please help me

frixo
  • 61
  • 2

1 Answers1

0

The only solution I found is on iOs to ask acces to microphone. If we have access to the microphone , we can user the webkitAudioContext to play sound !!

don't understand why, but it work.

navigator.mediaDevices.getUserMedia({ audio: true, video: false })
frixo
  • 61
  • 2