summaryrefslogtreecommitdiff
path: root/static/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/index.js')
-rw-r--r--static/index.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/static/index.js b/static/index.js
index b7056b1..6cda2f7 100644
--- a/static/index.js
+++ b/static/index.js
@@ -12,5 +12,23 @@ function SetRandomSong() {
console.log(body);
player.src = "/api/getSong?name=" + encodeURI(body.Name);
player.play();
+
+ document.getElementById("Artist").innerHTML = "Artist: " + body.Meta.Name;
+ document.getElementById("Title").innerHTML = "Title: " + body.Meta.Author;
+ document.getElementById("Album").innerHTML = "Album: " + body.Meta.Album;
+ document.getElementById("Start").innerHTML = "Start: " + body.Start + "s";
+
}));
}
+
+function Pause() {
+ const player = document.getElementById("mainAudio");
+ player.pause();
+ console.log("Paused audio");
+}
+
+function Resume() {
+ const player = document.getElementById("mainAudio");
+ player.play();
+ console.log("Paused audio");
+}