jellyfin-web/dashboard-ui/scripts/playlist.js
2013-04-10 13:11:23 -04:00

25 lines
360 B
JavaScript

var Playlist = (function() {
var self = this;
self.queue = [];
self.add = function(item) {
queue.push(item);
};
self.remove = function (index) {
queue.splice(index, 1);
};
self.play = function (index) {
MediaPlayer.play(queue[index]);
queue.shift();
};
return self;
})();