Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to set audio session category #73

Open
heshesh2010 opened this issue Dec 27, 2023 · 2 comments
Open

Failed to set audio session category #73

heshesh2010 opened this issue Dec 27, 2023 · 2 comments

Comments

@heshesh2010
Copy link

I got this error when change the audio category on real ios device to force video mute and unmute when I pressed on ringer button

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(1009, Failed to set audio session category, The operation couldn’t be completed. (OSStatus error 561017449.), null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322:18)

#2 FlutterVolumeController.setIOSAudioSessionCategory (package:flutter_volume_controller/src/flutter_volume_controller.dart:223:7)

@yosemiteyss
Copy link
Owner

https://developer.apple.com/documentation/coreaudiotypes/avaudiosessionerrorinsufficientpriority
You may need some extra handling for this scenario.

@heshesh2010
Copy link
Author

https://developer.apple.com/documentation/coreaudiotypes/avaudiosessionerrorinsufficientpriority You may need some extra handling for this scenario.

do u have any idea how to handle this case ? i'm switching from

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

and

FlutterVolumeController.setIOSAudioSessionCategory(
category: AudioSessionCategory.ambient,
);

when user switch ringer mode from on and off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants