jellyfin-web/dashboard-ui/scripts/playlist.js
2013-04-08 13:46:59 -07:00

18 lines
323 B
JavaScript

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();
}
};