我用jplayer播放mp3歌曲,我想播放下一首和上一首.我该怎么做呢?



请给出任何想法如何播放下一首歌曲和上一首歌曲…

jQuery(document).ready(function(){
    jQuery("#jquery_jplayer").jPlayer({
        ready: function (event) {
            jQuery(this).jPlayer("setMedia", {
                mp3:"http://www.jplayer.org/audio/mp3/Miaow-09-Partir.mp3"
            }).jPlayer('play');
        },
        swfPath: "js",
        supplied: "mp3",
        wmode: "window"
    });
});
$('#aElement').click(function(e){
  $.getJSON('/forwardsong', null, function(res) {
    // currentSong = res.mp3;
    // updateView(currentSong);
    $('#jquery_jplayer').jPlayer(
      'setMedia',
      { mp3: 'http://blabalabla.bla' + currentSong.url }).jPlayer('play');
    });
 });
使用AJAX

乐趣:)

最新更新