captbaritone / captbaritone/webamp
Seeking bar positions
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 796
- PR merge metrics
- No merged PRs in 30d
Description
As a kid, I used to watch the Winamp playing music. Not being allowed to touch anything, I was "analyzing" the UI. One thing that I liked watching was the seeking bar's position being updated with the elapsed time (and how it would depend on the song's length). It, unfortunately, doesn't work nicely in the winamp2-js:

Not sure if you already noticed that (I couldn't find it in the Issues). It gets updated more often, and the steps are not uniform (at least for songs shorter than 100s).
[Flooring the elapsed time when calculating the position](https://github.com/durasj/winamp2-js/commit/994da15f552cf859cb929b2ab713b499e85e90bd) how it's done in the getTimeObj would sync them when playing:

The harder problem is defining the steps on the range element. Since 100 is not divisible by every number <100 (we need a natural number as the step attr), I think the best solution would be to set min=0, max=Math.min(100, Math.floor(elapsed)), step=1. But some things would get slightly more complicated.
What do you please think?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.