Closed efstathiosntonas closed 2 years ago
Just found out that this happens with all audio messages, not only after seek, see video:
https://user-images.githubusercontent.com/717975/174294469-f1c58fb7-e977-489f-83da-d10cc163389d.mov
This video has disableTrackFollow
disabled at start and then disabled at 0:22, without it the track stays always in the middle of the thumb while when enabled the track starts "loosing" it and it stays progressively behind the thumb as the time pass by:
https://user-images.githubusercontent.com/717975/174297188-d55da1f6-1de6-4c52-9164-d6ae0401f42b.mov
hey @efstathiosntonas! thanks for looking into this! 🙏 I remember that I have dealt with this issue before, maybe it reappeared in a PR. I'll find time to look at it over the weekend or next week! this lib is not complicated, if you have solved this issue, welcome free commit PR, I can review and test it!
Thanks @alantoa, trying to debug it, if I manage to fix it I'll create a PR.
@alantoa found the bug, will create a PR
Thanks @alantoa, keep it up, this is a great library and trust me, I’ve used every single slider out there, this one handles seeking way better than the rest.
this one handles seeking way better than the rest.
thank you, LFG! I'm glad to help if you have any issues!
Hi @alantoa, thanks for this awesome library.
When I use
disableTrackFollow
there's a gap between the track and the thumb after seeking is complete on both iOS and Android. No expensive calculations or re-renders are taking place, only the parent which holds the player controls. I'm passing the progress directly to the slider from parent.See attached video, I've made the thumb transparent for testing purposes:
https://user-images.githubusercontent.com/717975/174292503-8fe06f5c-082f-4015-a4db-3ece72afe91f.mov
Parent:
and the
TrackPlayerProgress
:I believe there's a miscalculation between the thumbSize and the min track position/width after the seek. Tried to debug it a bit and what fixes it somehow is to remove
- thumbWidth
from this function:After removing the
- thumbWidth
it works fine but the thumb reaches the end and the audio is still playing.