edimuj / cordova-plugin-audioinput

This iOS/Android Cordova/PhoneGap plugin enables audio capture from the device microphone, by in near real-time forwarding audio to the web layer of your application. A typical usage scenario for this plugin would be to use the captured audio as source for a web audio node chain, where it then can be analyzed, manipulated and/or played.
https://github.com/edimuj/app-audioinput-demo
MIT License
161 stars 88 forks source link

Audioinput stops recording if an audio is played with cordova-media-plugin #122

Closed arturomf closed 1 year ago

arturomf commented 3 years ago

Hi all, I'm having a weird issue using audioinput.

If I start recording with audioinput.start() and after that, I play an audio using cordova-media-plugin, audioinput stops recording.

I'm testing in an Ionic5 app in iOS. In console I have this log:

Error Code responded -50 in file [..]/platforms/ios/appname/Plugins/cordova-plugin-audioinput/AudioReceiver.m on line 161

Any idea? Best Regards

edimuj commented 1 year ago

Yes, the problem is that both plugins rely on the AVAudioSession of the app and the media plugin isn't keen on sharing it with other plugins. Sorry this isn't something that can be fixed from this plugin.