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 17:03:28 -04:00

28 lines
No EOL
473 B
JavaScript

(function (window) {
function playlist() {
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;
}
window.Playlist = new playlist();
})(window);