I did it as follows:
self.update_timer = function (event) { var status = event.jPlayer.status; $('.jtimer').text($.jPlayer.convertTime(status.duration - status.currentTime)); }; $('.jplayer') .jPlayer('setMedia', { mp3: mp3_link }) .jPlayer('play') .bind($.jPlayer.event.timeupdate, self.update_timer);
The important thing is that the timeupdate event dispatches a status object with duration and currentTime properties that contain exactly what you need. The event is fired 4 times per second.
$.jPlayer.convertTime converts equal seconds (4225) to hours: minutes: seconds (01:10:25).
I donโt know for sure whether it was available in version 2.0, but in jPlayer 2.1.0 which I use it is written in docs ,
culebrรณn
source share