I've checked your MP3 file and yes it is encoded in Variable Bit-Rate mode.
Possible solutions:
(1) Confirm if working: The CBR version of your MP3 (right-click and save, then put & test on your server). If seekbar is working as expected then your solution is to re-convert. You can use a tool to re-convert MP3 from VBR mode into CBR mode.
Try converting via this site : https://audio.online-convert.com/convert-to-mp3
If converting many files try : FFmpeg which runs on the commandline, can process multiple files in a folder.
(2) Your values from .getDuration()
and .getCurrentPosition()
must be divided by 1000.
.getDuration()
will return a number in milliseconds. It takes 1000 m-secs to make 1 second. So your code must get expected value by dividing. eg: 5000 ms / 1000 = 5 seconds duration.
examples:
//# when using "getDuration"...
seekBar.setMax( mPlayer.getDuration() / 1000 );
//# when using "getCurrentPosition"...
seekBar.setProgress( mPlayer.getCurrentPosition() / 1000 );
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…