diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-05-21 21:31:29 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-05-21 21:31:29 +0200 |
| commit | 3f2e2147a2758bb49a06a85c6e2fc6a07fb02297 (patch) | |
| tree | 7a1e5bad24da684419dd5d57eabbe1e9223137f4 /web | |
| parent | 70279c4c62ae4180706c0d27c5bbcf275c903100 (diff) | |
| download | WRMS-3f2e2147a2758bb49a06a85c6e2fc6a07fb02297.tar.gz WRMS-3f2e2147a2758bb49a06a85c6e2fc6a07fb02297.zip | |
also toggle playpause button label on a stop event
Diffstat (limited to 'web')
| -rw-r--r-- | web/client.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/client.html b/web/client.html index a4818af..ee1a649 100644 --- a/web/client.html +++ b/web/client.html @@ -170,6 +170,11 @@ } function handleStop() { + // The stop event is only emmited if WRMS is Playing and runs out of songs. + // Therefore, we can safely change the button label to Pause since WRMS is playing. + // Seeing a stop event before a play event can occur when an admin calls /playpause + // with an empty playlist. + {{if .IsAdmin}} document.getElementById("ppbutton").innerHTML = 'Pause'; {{end}} playing = document.getElementById("playing").innerHTML = ""; } |
