From ae11ed555cb350ea4c11fc1625f4a56229969ddd Mon Sep 17 00:00:00 2001 From: Physick <96335032+DegustatorPonos@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:32:15 +0500 Subject: Tracks meta --- static/index.css | 46 ++++++++++++++++++++++++++++++++++++++++++++++ static/index.html | 24 ++++++++++++++++++++---- static/index.js | 18 ++++++++++++++++++ 3 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 static/index.css (limited to 'static') diff --git a/static/index.css b/static/index.css new file mode 100644 index 0000000..7748957 --- /dev/null +++ b/static/index.css @@ -0,0 +1,46 @@ +body { + background-color: wheat; + height: 100%; + overflow: hidden; + margin: 0px; + padding: 0px; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.controls > * { + padding: 0px; + margin: 0px; +} + +.controls { + background-color: rgb(0%, 0%, 0%, 0.5); + height: 5%; + padding: 0px; + padding-top: 3px; + padding-left: 10px; + padding-right: 10px; + border-radius: 10px 10px 0px 0px; + margin: 0px; + display: flex; + flex-direction: row; + gap: 5px; + + border-radius: 10px 10px 0px 0px; +} + +.controlBtn { + background-color: rgb(0%, 0%, 0%, 0); + border: 1px solid black; + border-radius: 5px; + background-color: lightgray; + padding-left: 5px; + padding-right: 5px; + margin: 0px; +} + +.controlElem { + margin: 0px; + padding: 0px; +} diff --git a/static/index.html b/static/index.html index f6127d7..4ebe902 100644 --- a/static/index.html +++ b/static/index.html @@ -1,13 +1,29 @@ + -

xdx

- - +
+

Rock culture exam

+

Artist

+

Title

+

Album

+

Start position

+
+
+ + + +
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"); +} -- cgit v1.3