From 9c5a6f265e54fe921d29be95ec580fc3aecf484c Mon Sep 17 00:00:00 2001 From: Techywarrior Date: Mon, 8 Apr 2013 13:46:59 -0700 Subject: [PATCH] added base playlist support functions --- dashboard-ui/scripts/playlist.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 dashboard-ui/scripts/playlist.js 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