Skip to content

Fix: gracefully handle AVAudioSession conflict when mic is busy #116

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

Merged

Conversation

tolutronics
Copy link
Contributor

@tolutronics tolutronics commented Jun 5, 2025

Pull request checklist

Please check if your PR fulfills the following requirements:

  • The changes have been tested successfully.

This PR wraps audioSession.setActive() inside do-catch to avoid fatal crashes when another app holds exclusive microphone access (e.g. Google Meet, FaceTime).
Instead of crashing, the plugin now returns a proper rejection to allow apps to handle the error gracefully.

Copy link
Member

@robingenz robingenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@robingenz robingenz merged commit 36cc033 into capacitor-community:master Jun 9, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants