massoudss/waveformSeekBar

Please make the max progress value of your control editable from outside.

Closed this issue · 3 comments

I like this library a lot and it helps us in achieving the goal to show and seek a waveform of a given audio file.

There is one problem thou, the max progress value seems to be hardcoded to 100F. This leads to the problem that on longer audio files (like over a Minute) the progress looks no longer like a fluid animation when using the default bar sizes.

If the max progress bar value could also be made available as an attribute for the layout and a variable to edit it in code, then it would allow using different max progress values that lead to much smoother progress animation.

I tried to do the needed changes myself and make a pull request afterwards, but I can not get your project to build after the changes due to:

error: failed linking file resources.

The lib module itself is building through, but the project doesn't. As this is my first attempt to actually do changes in a library, it would maybe be better if you @massoudss could add a small commit with the needed changes when you have time for that. I would really appreciate that.

Alternatively, you can also use a float for the progress.

I'd also like to have this feature. I really like the library, but only to be able to have 100 steps does not allow any smooth scrolling. I have added the pull request #17, which is no breaking change but extends it with a maxProgress setting similar to the one that the android seekbar has, too.