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

Audio buttons adjust phone volume instead of media volume #54

Open
clone1018 opened this issue Mar 23, 2022 · 1 comment
Open

Audio buttons adjust phone volume instead of media volume #54

clone1018 opened this issue Mar 23, 2022 · 1 comment
Assignees
Labels
bug Something isn't working os:android Android OS Issues

Comments

@clone1018
Copy link
Member

We've got the audio coming out of the media output device successfully, but it appears we're still registering some type of phone volume because by default adjusting the android audio changes the phone volume instead of media.

By default, pressing the volume control modifies the volume of the active audio stream. If your app isn't currently playing anything, hitting the volume keys adjusts the music volume (or the ringer volume before Android 9).
From: https://developer.android.com/guide/topics/media-apps/volume-and-earphones#java

@clone1018 clone1018 added bug Something isn't working os:android Android OS Issues labels Mar 23, 2022
@clone1018 clone1018 self-assigned this Mar 23, 2022
@clone1018
Copy link
Member Author

I suspect the real issue is that somewhere deep in the Flutter WebRTC library we're still treating this like a call. Honestly since we don't even need half the features the library provides we may want to consider slimming it down a bit.

I tried some crazy combinations of code, based on Googling. The recommended solution was something like:

Activity activity = getActivity();
activity.setVolumeControlStream(AudioAttributes.USAGE_MEDIA);

Which did not work, so that leads me to believe something is overwriting that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working os:android Android OS Issues
Projects
None yet
Development

No branches or pull requests

1 participant