diff options
| author | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2025-12-13 12:32:15 +0500 |
|---|---|---|
| committer | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2025-12-13 12:32:15 +0500 |
| commit | ae11ed555cb350ea4c11fc1625f4a56229969ddd (patch) | |
| tree | 1d02b84131b713a2eed9a332ffac51997b0ec285 /static/index.js | |
| parent | 4b8ef84059e772ef7636c451356680ec5b0983c4 (diff) | |
Tracks meta
Diffstat (limited to 'static/index.js')
| -rw-r--r-- | static/index.js | 18 |
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"); +} |
