jellyfin-web/dashboard-ui/scripts/playlist.js

18 lines
323 B
JavaScript
Raw Normal View History

2013-04-08 13:46:59 -07:00
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();
}
};