0

I am after a very basic music player, I have the following basics working now, however;

1) How to make both the Play and Pause buttons in one button? That appears first as Pause and on click It toggles Play and on click again it Toggle Pause?

2) Also Is there anyway to add a progress counter? not a bar, but numbers i.e. 0.3/4.0min

Here is the fiddle: www.jsfiddle.net/tjHhY And here is the code as well here:

var audio = new Audio("http://dp0169.free.fr/Musique/Air/Air%20-%20Talkie%20Walkie/02%20Cherry%20Blossom%20Girl.mp3");

$(".play").click(function () {
    audio.play();
})

$(".pause").click(function () {
    audio.pause();
})
4

2 に答える 2

1

このデモをチェックしてみてください。それが役に立てば幸い :)

于 2014-01-24T23:11:20.463 に答える