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

Fix Microphone Permission Dialog on macOS #38

Merged
merged 2 commits into from
Feb 21, 2025

Conversation

sujithatzackriya
Copy link
Collaborator

Problem

The microphone permission dialog was not being properly triggered on macOS, unlike the screen recording permission dialog. This was because we were only building the audio stream but not actually starting it, which is required on macOS to trigger the system permission dialog.

Changes

  • Modified trigger_audio_permission() to properly trigger the macOS permission dialog:
    • Actually start the audio stream using stream.play()
    • Added brief sleep to allow dialog to appear
    • Properly clean up resources by explicitly dropping the stream
    • Improved error logging using the error! macro

Testing

  1. Run the app on a macOS system where microphone permissions haven't been granted
  2. Verify that the system permission dialog appears, similar to the screen recording dialog
  3. Test both "Allow" and "Deny" scenarios to ensure proper handling

Related Issues

Microphone Input Handling Improvement #35

@sujithatzackriya sujithatzackriya merged commit b742c46 into devtest Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Microphone Input Handling Improvement
2 participants