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

[iOs] plugin configures AVAudioSession after AVAudioPlayer makes it active inside prepareToPlay #319

Open
RSATom opened this issue Oct 14, 2021 · 2 comments

Comments

@RSATom
Copy link

RSATom commented Oct 14, 2021

According to AVAudioPlayer docs prepareToPlay activates audio session (in plugin it happens here). But plugin calls setCategory for AVAudioSession a little bit later, i.e. at wrong time.

@RSATom
Copy link
Author

RSATom commented Oct 14, 2021

I found this issue while was trying to solve #306. I was trying to add withOptions:AVAudioSessionCategoryOptionMixWithOthers to https://github.com/apache/cordova-plugin-media/blob/master/src/ios/CDVSound.m#L374 but it was working only on second play...

@johannds
Copy link

johannds commented Feb 4, 2022

It blows my mind that this isn't configurable inside this highly used plugin.

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

No branches or pull requests

2 participants