edimuj/cordova-plugin-audioinput

iOS stream to web in background

bigxd123 opened this issue · 0 comments

Hey, should the plugin work when the app goes into background?

I enabled the Audio background permission and whenever I minimize the app now it doesnt send audio to the server but as soon as it returns into foreground it sends everything at once.

So it seems like it is still recording just not sending it through the MediaStream?

` audioinput.start({
streamToWebAudio: true
//audioContext: audioContext
//audioSourceType: audioinput.AUDIOSOURCE_TYPE.VOICE_COMMUNICATION
});

          let audioContext: AudioContext = audioinput.getAudioContext();

          let streamNode = audioContext.createMediaStreamDestination();
          audioinput.connect(streamNode);`

This is how I use the plugin. I just access the streamNode.stream and pass it to my webrtc connection which works just fine except for the described background issue.

Im using version 1.0.1 since version 1.0.2 does not work for me on iOS 12.4.