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

stop playback if another app receives audio focus #11

Open
phibo23 opened this issue Dec 18, 2014 · 5 comments
Open

stop playback if another app receives audio focus #11

phibo23 opened this issue Dec 18, 2014 · 5 comments
Assignees

Comments

@phibo23
Copy link

phibo23 commented Dec 18, 2014

http://developer.android.com/training/managing-audio/audio-focus.html

@TVLuke
Copy link
Contributor

TVLuke commented Dec 18, 2014

Used that exact developer-page, decided that ducking is cooler than stoping. I am not willing to write an app that stops playback if someone actually starts another music app (I have tested the apps on my phone and apparently neither is anyone else). If a user actually intents to start a second full-time music playing app, he/she should just close the one currently playing the music.

So, the process is only relevant for notifications, and in that case I though, ducking (turning it down, but not turning it off) is just much cooler and implemented since 1.0.7

@TVLuke TVLuke self-assigned this Dec 18, 2014
@TVLuke TVLuke added this to the TrashPlay 1.0 - Like A Boss milestone Dec 18, 2014
@phibo23
Copy link
Author

phibo23 commented Dec 18, 2014

stopping if another app gets focus (for something that is longer than a notification) and continuing if the focus returns is expected behaviour (at least for someone who also uses iOS). BeyondPod does exactly that. VLC ducks for TrashPlay (which sounds very weird) but stops for BeyondPod and YouTube.

@TVLuke
Copy link
Contributor

TVLuke commented Dec 18, 2014

hmm... will have to look into this. Because there is only one way to request focus (per audio context)... so how does VLC know? Anyway, whats the scenario here? Why would anyone even do that? Ever?

@phibo23
Copy link
Author

phibo23 commented Dec 18, 2014

listening to trashplay music while surfing the webz, clicking a link to youtube or any other media that has audio. And I just tested youtube in chrome: BeyondPod stops, VLC ducks. And Chrome does not return focus to previous owner if you pause youtube video. ^^

@TVLuke
Copy link
Contributor

TVLuke commented Dec 18, 2014

Ok. I'll just leave this bug report here for when I'm not busy actually fixing critical bugs on this thing. Anyway, probably not chromes fault but the other guys. If you stop playing audio the focus is released automatically, you just have to catch that event and remember what the volume was previously... which works like almost all the time for trash play (and I have not been able to understand why it does not work all the time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants