llfbandit / record

Audio recorder from microphone to a given file path. No external dependencies, MediaRecorder is used for Android an AVAudioRecorder for iOS.
https://pub.dev/packages/record
239 stars 202 forks source link

Expose AVAudioSession interface #279

Closed ajsharp closed 1 month ago

ajsharp commented 9 months ago

Is your feature request related to a problem? Please describe. I need access to the AVAudioSession swift class. This is useful and necessary sometimes, such as when connected to a car bluetooth device to "end the call" that cars will "start" when you are using the mic when in the car.

Describe the solution you'd like Make a method available that allows setting the AVAudioSession category.

llfbandit commented 8 months ago

This package won't expose this. What can be done is to restore the previous category before the recording.

mynlexi commented 3 months ago

This is also quite a big painpoint for our project

bbjay commented 1 month ago

There is a new option IosRecordConfig.manageAudioSession (in master, but not yet released) which you can set to false and then use the audio_session plugin to manage the AVAudioSession all by yourself.

llfbandit commented 1 month ago

manageAudioSession & category options ref: d25e64ca67f269ce732af86b617be89e2b358ef7 8485404cc397786f8ea71cc1982bc1ebfead7e28