CasperPas / flutter-sound-stream

stream audio data in & out
GNU General Public License v3.0
84 stars 111 forks source link

Recording stream stops working on iOS if audioplayers plugin used to play an audio file #24

Open sveinbjornt opened 3 years ago

sveinbjornt commented 3 years ago

I am using the sound_stream package to do microphone recording and using the audioplayers Flutter package (https://pub.dev/packages/audioplayers) to do audio playback. However, after I play a sound, the sound_stream recording stops working. This seems to only happen on iOS.

IssacPrecious commented 3 years ago

Yes. I'm also facing the same issue.

sveinbjornt commented 3 years ago

@IssacPrecious I ended up using flutter_sound instead, for both recording and playback.

Toseefsaim commented 3 years ago

you should add library and a small changes into the library of audio player plugin it can easily resolve this issue

Toseefsaim commented 3 years ago

By default iOS and macOS forbid loading from non-https url. To cancel this restriction on iOS or macOS you must edit your .plist and add:

NSAppTransportSecurity NSAllowsArbitraryLoads

change into manifest file

Toseefsaim commented 3 years ago

By default iOS and macOS forbid loading from non-https url. To cancel this restriction on iOS or macOS you must edit your .plist and add:

NSAppTransportSecurity NSAllowsArbitraryLoads

change into manifest file

t-kietzmann commented 3 years ago

How you fixed it without touching another package? I'm using just_audio.

NikhilKukreja26 commented 3 years ago

Hello did anyone get the solution because i am also facing the same issue. Thank you.

t-kietzmann commented 2 years ago

Some news? Or did someone find a lib which is working on iOS?

Teajayy007 commented 2 years ago

Some news? Or did someone find a lib which is working on iOS?

yes using soundpool package for audio playback works.

RishiKar commented 2 years ago

Hello, I have a similar issue. After I play a file using just_audio (I have made sure I stop , cancel and dispose after playback), I can't get sound stream to pick up the mic input. If I do not play the file before and use only sound stream to record, it works as intended. I am using the soundstream recorder. Any reasons why or any tweak/hack that could work. I really don't want to use another streaming package but can change my playback package if necessary

quickratio commented 2 years ago

Solution by @larpoux here: https://github.com/Canardoux/flutter_sound/issues/855

It is for his package flutter_sound, however it also indeed resolves this issue for sound_stream also.

Please consider buying him a coffee (or more) for his hard work, he spent several days resolving the issue with a detailed explanation :)

https://www.buymeacoffee.com/larpoux