1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/playlist.js
2013-04-10 13:11:23 -04:00

25 lines
No EOL
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;
})();