Skip to content

Recording permission check at SDK level #688

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hiroshihorie
Copy link
Member

@hiroshihorie hiroshihorie commented May 2, 2025

Check perms right before engine input is requested to be enabled.
CLT-1548

  • Return custom error
  • Also check AVAudioSession for iOS platforms

Copy link

ilo-nanpa bot commented May 2, 2025

it seems like you haven't added any nanpa changeset files to this PR.

if this pull request includes changes to code, make sure to add a changeset, by writing a file to .nanpa/<unique-name>.kdl:

minor type="added" "Introduce frobnication algorithm"

refer to the manpage for more information.

@hiroshihorie hiroshihorie marked this pull request as ready for review May 4, 2025 09:55
Copy link
Contributor

@pblazej pblazej left a comment

Choose a reason for hiding this comment

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

  • Starting a fresh app with try! AudioManager.shared.setRecordingAlwaysPreparedMode(true) looks like a deadlock (or the popup appears underneath)
  • What's the reason for this change?

@hiroshihorie
Copy link
Member Author

hiroshihorie commented May 5, 2025

@pblazej I think you need to test with the LKTestHost app, it might be blocking at the permissions dialog. However, I believe I can disable this check for the Simulator.

The purpose of this check is that in some cases, the audio engine appears to start but only produces empty frames. I want to ensure the condition is valid, otherwise, an error should be thrown.

@pblazej
Copy link
Contributor

pblazej commented May 5, 2025

@pblazej I think you need to test with the LKTestHost app, it might be blocking at the permissions dialog. However, I believe I can disable this check for the Simulator.

Hm, I'm testing with LiveKitExample (device) - I think it can be reproduced with any other (consumer) app.

@hiroshihorie
Copy link
Member Author

@pblazej Ok, I think I can repro it. It happens when you call it from main thread before UI gets initialized maybe.
I'll see if there's a work around...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants