+ 2

Why my code is behaving strangely?

https://sololearn.com/compiler-playground/WpcagVoCUwVO/?ref=app In the first song, When I play it and listen it for a while. Then when i click on pause button(Not MasterPlay... I am referring to font awesome..) it starts from zero. BUT in second song. It starts from the point I PAUSED it. Why this strange behaviour is happening?

22nd Jul 2025, 6:59 PM
Manav Roy
Manav Roy - avatar
1 Réponse
+ 3
The strange behavior you're seeing in your music player is because the first song isn't saving its playback position when you pause it with its individual button, while the second song (and others) are essentially resetting to whatever the main progress bar is showing when you click their play button. The core issue is that you're not consistently storing and retrieving the currentTime for each song. https://sololearn.com/compiler-playground/W4lSa5YbvOuF/?ref=app here are some additional options to your music player... https://sololearn.com/compiler-playground/WKk3i5vHt4SY/?ref=app
22nd Jul 2025, 11:59 PM
BroFar
BroFar - avatar