How to start over the audio each time you click play with the mb.miniAudioPlayer plug-in

Someone asked me if the player could be set to start over when the it is paused and played again.

At the time the player behavior is that if you pause it and then play it again it starts from the last paused time; to make it works as asked you need to push the “playHead” behavor on the “play” event; that way every time you click on the play button the player will rewind and then play.

Here is the snippet to solve the lack:

Simply add to the “onPlay” callback the jPlayer “playHead” method to the actual player. That’s all.