Closed Haidar0096 closed 3 years ago
I just found that this issue is a dupplicate of #333 I will close it here and follow that issue
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 just_audio.
Which API doesn't behave as documented, and how does it misbehave? It is method seek of AudioPlayer
Minimal reproduction project NOTE: PLease don't close this again, I can give the link to the repo if you want but I already provided you with the necessary code in my opinion to understand the problem, just tell me if you need more info to know
I can't provide a custom minimal reproducible code right now bcz the code base is very large but here are a fragment that can explain the problem very well
in my service class:
my bloc event handler:
my seekbar: (it just adds an event to the bloc, and it is present inside a stream builder (more about the stream below)
in the init method of my service class I have a stream that listens to the positionStream of the AudioPlayer and emits the same events (this duplication is because I am using an interface and not the AudioPlayer directly in my code, just clean architecture):
here are the logs of the above print statements, you can see that the AudioPlayer and my own stream are all updating their values correctly, But when I am listening to the sound being played, it is actually being restarted from the beginning:
I am testing this on a real android phone with android version 8.0.0 Huawei p10 lite
To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior:
Error messages
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Flutter SDK version
Additional context Add any other context about the problem here.