mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 19:41:55 +02:00
First draft for "Play Next" feature
This commit is contained in:
parent
cb9062c004
commit
7c5ec76f51
11 changed files with 88 additions and 3 deletions
|
@ -187,5 +187,24 @@ jPlayerPlaylist.prototype._highlight = function(index) {
|
|||
}
|
||||
};
|
||||
|
||||
jPlayerPlaylist.prototype.addAfter = function(media, idx) {
|
||||
if (idx >= this.original.length || idx < 0) {
|
||||
console.log("jPlayerPlaylist.addAfter: ERROR, Index out of bounds");
|
||||
return;
|
||||
}
|
||||
|
||||
$(this.cssSelector.playlist + " ul")
|
||||
.find("li[name=" + idx + "]").after(this._createListItem(media)).end()
|
||||
.find("li:last-child").hide().slideDown(this.options.playlistOptions.addTime);
|
||||
|
||||
this._updateControls();
|
||||
this.original.splice(idx + 1, 0, media);
|
||||
this.playlist.splice(idx + 1, 0, media);
|
||||
|
||||
if(this.original.length === 1) {
|
||||
this.select(0);
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue