" + this.playlist[i].duracion + "
" + this.playlist[i].formacion + "
" + this.playlist[i].canta + "
" + this.playlist[i].detalles + "
";
listItem += "";
$(this.cssSelector.playlist + " ul").append(listItem);
$(this.cssSelector.playlist + "_item_" + i).data("index", i).click(function () {
var index = $(this).data("index");
if (self.current !== index) {self.playlistChange(index);} else {$(self.cssSelector.jPlayer).jPlayer("play");}
$(this).blur();
return false;
});
// Agrega accion al boton Agregar a mi Lista
$(this.cssSelector.playlist + "_AgregarALista_" + i).data("idgrabacion", this.playlist[i].id).data("index", i).click(function () {
var index = $(this).data("index");
AgregarALista(0, $(this).data("idgrabacion"));
$(self.cssSelector.playlist + "_AgregarALista_" + index).hide(200);
$(self.cssSelector.playlist + "_Agregada_" + index).show(200);
return false;
});
}
},
playlistInit: function(autoplay) {
if (autoplay) {
this.playlistChange(this.current);
} else {
this.playlistConfig(this.current);
}
},
playlistConfig: function(index) {
$(this.cssSelector.playlist + "_item_" + this.current).removeClass("jp-playlist-current").parent().removeClass("jp-playlist-current");
$(this.cssSelector.playlist + "_item_" + index).addClass("jp-playlist-current").parent().addClass("jp-playlist-current");
this.current = index;
$(this.cssSelector.jPlayer).jPlayer("setMedia", this.playlist[this.current]);
},
playlistChange: function(index) {
this.playlistConfig(index);
$(this.cssSelector.jPlayer).jPlayer("play");
},
playlistNext: function() {
var index = (this.current + 1 < this.playlist.length) ? this.current + 1 : 0;
this.playlistChange(index);
},
playlistPrev: function() {
var index = (this.current - 1 >= 0) ? this.current - 1 : this.playlist.length - 1;
this.playlistChange(index);
}
};
var audioPlaylist = new Playlist("2", [
{id:"712",idtema:"1279",titulo:"Don Juan (El taita del barrio)",canta:"Instrumental",detalles:"31-1-1955 Buenos Aires RCA-Victor 1A-0390 S3725",duracion:"02'49"",formacion:"Orquesta Carlos Di Sarli",oga:"https://sbits.us-sea-1.linodeobjects.com/todotango/ogg/712.ogg",mp3:"https://sbits.us-sea-1.linodeobjects.com/todotango/mp3/712.mp3",existeenlistasusuario:"0",idusuario:"0"}
]
, {
ready: function() {
audioPlaylist.displayPlaylist();
audioPlaylist.playlistInit(false); // Parameter is a boolean for autoplay.
},
ended: function() {
audioPlaylist.playlistNext();
},
play: function() {
$(this).jPlayer("pauseOthers");
},
swfPath: "../js",
supplied: "oga, mp3"
});
$("#jplayer_inspector_2").jPlayerInspector({ jPlayer: $("#jquery_jplayer_2") });
});
//]]>