diff --git a/dashboard-ui/scripts/playlist.js b/dashboard-ui/scripts/playlist.js new file mode 100644 index 0000000000..75622452e8 --- /dev/null +++ b/dashboard-ui/scripts/playlist.js @@ -0,0 +1,18 @@ +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(); + } + +}; \ No newline at end of file