-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
Music player paused accidentally when the app is launching #112
Comments
when you tell |
Ok thanks that's my next bug to fix ! |
found, it's because of the |
maybe I can make this optional, like "requestAudioFocus: true" on open method (by default), which enable to listen audio focus & stop on phone call setting it to false will solve your issue, but recieving a phone call will not pause the audio ! |
or maybe migrate to https://stackoverflow.com/questions/5948961/how-to-know-whether-i-am-in-a-call-on-android, to only pause on phone call :) I'll look for this |
this solution requires runtime permission :/ it's not a good solution for the user |
This sounds good. How if we can |
If we do this, it will stop the other media player at the start, like your qq music player I think you'll need to make a choice,
|
Am I missing something? I mean pause other players when the app which calling this package to play an audio. This behaviour is fine because it calls by user's request. e.g. I'm playing some music with QQMusic, then I start my flutter app, choose an audio and try to play it, at that time it should stop my music and play the audio I requested. |
Oh ok I see, I just have to move the request audio, sorry ^^ I'll do that today |
I fixed this, can you try the |
I close it but if this does not work, reopen it please :) |
Thanks for your rapid response! And it's been resolved through I tested with my devices. |
Hi @AlexV525 , current I'm using version assets_audio_player: ^2.0.13+8. But when I play a AssetsAudioPlayerGroup. Sound play normally but when I go to background and open app again. Sound auto stopped. I check log when I open app again see that: Please help me check it. Thanks |
@vinh-savvycom can you paste your open method here ? |
@kalismeras61 here is code init AssetsAudioPlayerGroup
and here sample code add audio and play
I used this command for play sound
I have issue on Android real device and debug mode. Thanks |
Flutter Version
My version : 1.17.1
Lib Version
My version : 1.6.0+4
Platform (Android / iOS / web) + version
Platform : Android (iOS not tested)
Device Model: OnePlus 8 Pro (IN2020) / OnePlus 6T (A6010)
Describe the bug
When a flutter app implemented this package (e.g. just import it), start the app will pause the current playing audio (Music that was playing).
Step to reproduce
assets_audio_player: ^1.6.0+4
intopubspec.yaml
.The text was updated successfully, but these errors were encountered: