Open tronizx opened 10 months ago
Minimal reproduction project Provide a link here using one of two options: I used the default example from Just_audio documentation. After that I only do play songs in sequence using basic logic that if playerstate is completed then load next url from list and play another , It mostly occur in 3rd audio/Music file, yes!! it is very unusual that it dosen't stop suddenly in 1st or second music which is about 3 or 4 min long but it randomly stop playing in middle of 3rd song(dunno why??).
Please try to make the bug report easy to process by following the instructions given. i.e. use one of the two options. (If you are using the unmodified example, just say that. If you have modified the example, link your fork.)
Minimal reproduction project Provide a link here using one of two options: I used the default example from Just_audio documentation. After that I only do play songs in sequence using basic logic that if playerstate is completed then load next url from list and play another , It mostly occur in 3rd audio/Music file, yes!! it is very unusual that it dosen't stop suddenly in 1st or second music which is about 3 or 4 min long but it randomly stop playing in middle of 3rd song(dunno why??).
Please try to make the bug report easy to process by following the instructions given. i.e. use one of the two options. (If you are using the unmodified example, just say that. If you have modified the example, link your fork.)
it is a same example from documentation!!
You shouldn't need to write a wall of text under "Minimal reproduction project" when it should be a single line - either write "The example" or write the link to your fork. Please follow the instructions, thanks.
Hi @tronizx were you able to figure out what was going on?
Hi @tronizx were you able to figure out what was going on?
NO!! but yes there is a random workaround for that is after going to setting of apps in android phone we have to switch the app from battery optimized mode (default in android for every app) to unrestricted mode. For personal usage this is not a problem but in production build it is serious problem because we can't ask the user to change the mode it will give the user hint that it is going to use sooo much battery even if not. So, the proper solution still I am searching.
I am currently facing this same issue, when on foreground the audio pauses after a bit, the lenght in which it pauses varies, i need to go to the app again for it to continue playing.
I am currently facing this same issue, when on foreground the audio pauses after a bit, the lenght in which it pauses varies, i need to go to the app again for it to continue playing.
I guess till then you can try with switching battery mode!!
Quick update: Not a real solution, just what we encountered: After creating a new Flutter app and rewriting the audio player feature to also implement background audio, the problem doesn't manifest anymore for us. Not sure if it was related to the battery optimized mode or not, but maybe this insight can help others, especially if you're planning on having background play, I would just implement it that way from the get go.
I don't know how to put things in a comprehensive way so please try to understand and ignore some mistake 😊 Which API doesn't behave as documented, and how does it misbehave? When using API
AudioPlayer()
to play music from internet using method .setUrl, Everything is fine when i run this in emulator in PC(Android 11) but when run the same application in Real Physical Device(Android 12) it suddenly and Randomly stopped from playing music.Minimal reproduction project The example
To Reproduce (i.e., user steps, not code) Steps to reproduce the behavior: I just ran the basic app with play and pause buttons and basic logic to play music from internet with fixed set of URLs I have (working fine with emulator all of them same code, played almost more then 5-6 songs in emulator and got no interruptions).
Error messages Getting this message when using same just_audio app on android while playing. why posting when app is working? - cause these logs are not showing when i am using this app on emulator, in emulator it just shows the information of how much buffer is getting or whatever it is for but not this type of continuous message.
And giving this in terminal when it suddenly stopped from playing-
Expected behavior it shouldn't stop from playing until unless the audio file completes or paused/stopped manually using methods like .pause() or .stop() .
Smartphone (please complete the following information):
Flutter SDK version
Additional context When it stops playing in physical device there is one thing i noticed that when it stopped from playing suddenly without any manual interruption in that position there is no buffer is loaded in progress bar.