yosemiteyss / flutter_volume_controller

A Flutter plugin to control system volume and listen for volume changes on different platforms.
https://pub.dev/packages/flutter_volume_controller
MIT License
12 stars 7 forks source link

getVolume resets iOS AudioSessionCategory to ambient #76

Open meowofficial opened 3 weeks ago

meowofficial commented 3 weeks ago

As far as I understand in swift code in some methods default AudioSessionCategory is used instead of configured one.

await FlutterVolumeController.setIOSAudioSessionCategory(
  category: AudioSessionCategory.playback,
);

print(await FlutterVolumeController.getIOSAudioSessionCategory()); // AudioSessionCategory.playback

await FlutterVolumeController.getVolume();

print(await FlutterVolumeController.getIOSAudioSessionCategory()); // AudioSessionCategory.ambient
yosemiteyss commented 3 weeks ago

Fixed in 1.3.2.

meowofficial commented 3 weeks ago

@yosemiteyss getVolume still resets current AudioSessionCategory to AudioSessionCategory.ambient if AudioSessionCategory.playback set by another library.