-
-
Notifications
You must be signed in to change notification settings - Fork 481
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 doesn't stop playing when another player starts or a call comes in on Android #403
Comments
The example works fine according to my own tests.
There is no list of songs in the example, and according to my testing, it doesn't exhibit the behaviour you describe...
If I can clarify, this plugin is not intended to control playback itself, it merely provides the callbacks that you can override in your own app to do that sort of thing if you want to. If your app is not doing that, it is because you have not implemented the callbacks to do that. Incidentally, I have shown how to implement the callbacks in the example to do just that.
I am not clear on which API and which documentation you are referring to here. |
@ryanheise Am sorry, my bad. I just came across the callbacks you implemented. I was able to achieve the desired behaviour by overriding |
@ryanheise please tell me where can I find these callback? |
You can use audio_session to handle phone call and other interruptions. just_audio also handles this automatically by using audio_session internally. |
@ryanheise I am using just_audio with audio_service but it is not getting interrupted by other music app and call, I tried audio_session in onStart() and configure it to music() and start listening stream but it is also not getting
}` |
You need to call |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service. |
Which API doesn't behave as documented, and how does it misbehave?
The Audio playback is supposed to pause when another audio player starts playing or when a call comes in. But in this case the audio just continue playing regardless of whether you're on a call or started another player. You have to pause it manually which is a bad user experience.
Minimal reproduction project
Provide a link here using one of two options:
"The example"
To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:
Error messages
Expected behavior
The playback controlled by this library should pause or stop when another audio playback from another application starts or when another application needs to use the phone's speaker
Screenshots
Runtime Environment (please complete the following information if relevant):
Flutter SDK version
Additional context
The text was updated successfully, but these errors were encountered: