mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
25 lines
360 B
JavaScript
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;
|
|
|
|
})(); |