I'm working on a Cordova app where the user can record his/her voice with background audio. This is working perfectly in Android, but in iOS it don't. I don't know if this has anything to do with resources or something.
I've tried with
cordova-plugin-nativeaudio, it plays the audio while I'm not recording. But as soon as I turn the recorder on, it won't play the audio.
cordoba-plugin-media for recording.
Here is an example:
var audio = new Audio("audio/click.wav");
var record = new Media(src, onSuccess, onError);
I know that playing audio with onclick don't work, so thats why I'm using touchstart
AFAIK, this isn't possible on iOS with those plugins. You'll probably need to go lower level (and wrap it with a plugin). Based on quick Google searches, you'll probably want to use AudioUnit APIs.
Thanks for quick answer.
I think I'm on to something now with av-audio-session-adapter or using cordova-plugin-audioinput.
I have also read that I can comment out a line from cordova-media-plugin, so I'll come back with an update