mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added base playlist support functions
This commit is contained in:
parent
310456481f
commit
9c5a6f265e
1 changed files with 18 additions and 0 deletions
18
dashboard-ui/scripts/playlist.js
Normal file
18
dashboard-ui/scripts/playlist.js
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
var PlayList = {
|
||||||
|
|
||||||
|
queue: Array(),
|
||||||
|
|
||||||
|
addItem: function (item) {
|
||||||
|
PlayList.queue.push(item);
|
||||||
|
},
|
||||||
|
|
||||||
|
removeItem: function (index) {
|
||||||
|
PlayList.queue.splice(index, 1);
|
||||||
|
},
|
||||||
|
|
||||||
|
playItem: function (index) {
|
||||||
|
MediaPlayer.play(PlayList.queue[index]);
|
||||||
|
PlayList.queue.shift();
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue