I use Jquery to play audio on my website.
var url = 'path-to-audio';
song = new Audio(url);
song.play();
It works very well. Then I create a button to set the position
<button onclick="setCurrentTime()">Set now!</button>
And its callback
function setCurrentTime()
{
song.currentTime = 100;
}
But everytime I click on the button, the audio start from beginning ( currentTime back to 0 !?). I don't know why this happened. I appreciate your help.