vendredi 30 janvier 2015

jPlayer make some adjustments

I want to use jPlayer to make a ul with a few li items inside of I've a song to play.


I found a simple kind of, demo08 this is javascript code



$(document).ready(function(){

var stream = {
title: "ABC Jazz",
mp3: "http://ift.tt/1AcrPEd"
},
ready = false;

$("#jquery_jplayer_1").jPlayer({
ready: function (event) {
ready = true;
$(this).jPlayer("setMedia", stream);
},
pause: function() {
$(this).jPlayer("clearMedia");
},
error: function(event) {
if(ready && event.jPlayer.error.type === $.jPlayer.error.URL_NOT_SET) {
// Setup the media stream again and play it.
$(this).jPlayer("setMedia", stream).jPlayer("play");
}
},
swfPath: "../../dist/jplayer",
supplied: "mp3",
preload: "none",
wmode: "window",
useStateClassSkin: false,
autoBlur: false,
keyEnabled: true
});


});


The problem is following, I've a few li'items with different song.. how can I set in this case.. to change this to get from one attr ? I was thinking for this solution but I'm not so able to implement..


Can someone to help me with this?


Aucun commentaire:

Enregistrer un commentaire