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

Consider exposing/implementing audioSession options #24

Open
doraorak opened this issue Aug 16, 2024 · 3 comments
Open

Consider exposing/implementing audioSession options #24

doraorak opened this issue Aug 16, 2024 · 3 comments

Comments

@doraorak
Copy link

In ios there are multiple options to configure AVAudioSession instances (https://developer.apple.com/documentation/avfaudio/avaudiosessioncategoryoptions?language=objc). Since this API is just changing the Category of the AVAudioSession in the webprocess where WKWebView is getting rendered and playing audio, it only makes sense we should be able to set its options as well. Thanks.

@youennf
Copy link

youennf commented Sep 19, 2024

Do you have a specific use-case in mind that would not be covered by the existing API?

@doraorak
Copy link
Author

For example it would allow us to have normal output volume (instead of low) when using play-and-record category (https://developer.apple.com/documentation/avfaudio/avaudiosessioncategoryoptions/avaudiosessioncategoryoptiondefaulttospeaker?language=objc) or mix external audio (like spotify) with the wkwebview's audio while the ringer switch is on silent (https://developer.apple.com/documentation/avfaudio/avaudiosessioncategoryoptions/avaudiosessioncategoryoptionmixwithothers?language=objc)

Most importantly it would improve the coherence between native and web/hybrid applications

@youennf
Copy link

youennf commented Sep 20, 2024

Thanks for the input, this is useful.

The first usecase is related to speaker selection, which is something AudioSession could tackle.

The second one is related to ongoing discussions on how a tab audio can mix with other tabs or other apps.

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