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
233 stars 196 forks source link

Customization of iOS audio categories from flutter. #396

Closed chanonly123 closed 3 weeks ago

chanonly123 commented 3 weeks ago

iOS specific only. Now we can send this in RecordConfig, iosAudioCategories.

const config = RecordConfig(encoder: encoder, numChannels: 1, iosConfig: IosRecordConfig(audioCategories: [IosAudioCategories.allowBluetooth]));

When recording starts, iOS recorder uses these categories.

llfbandit commented 3 weeks ago

Thanks for your contribution! Despite few changes requested, everything looks good! 👍

chanonly123 commented 3 weeks ago

Please check again, updated, thanks.

chanonly123 commented 3 weeks ago

Mapping from String to AVAudioSession.CategoryOptions enums moved. Please check.

llfbandit commented 3 weeks ago

Many thanks for first opening ios specific config!

chanonly123 commented 3 weeks ago

Welcome. BTW tried to run macos project but pod install breaking. Can you help me here, then I can update for macos as well. I am using melos bootstrap inside root.

llfbandit commented 3 weeks ago

In the example project? What if you delete macos/Podfile.lock?

Also be sure to use a not too old version of cocoapod.

tgalery commented 1 day ago

I am also having some issues using the code incorporated in this MR:

I've added the following on my pubspec dependencies.

 record:
    git:
      url: https://github.com/llfbandit/record.git
      ref: master
      path: record

Looking at the pubspec.lock things seem to be updated to the 5.1.3 version and the record_darwin version to 1.1.2 (in my Podspec.lock file it still points to 1.0.0 though). However the record_platform_interface seems to be unchanged and essentially this doesn't allow me to use the ios config.

Would it be possible to make a new release available to the general public with the changes ?

Thanks a lot !

tgalery commented 6 hours ago

@chanonly123 could you specify the steps to use the code in this git repo to test locally ? My local env is resolving to hosted versions which do not contain the changes you introduce in this MR.