aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-05-31 22:06:53 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-05-31 22:06:53 +0200
commit039881fdbfa69a33b27f84e8db3671fe8cfac5e6 (patch)
tree3746f6394f7999f1b6bf8826c9a364c11febc6ab /web
parent0d0b416146dd146a5dcfbf61f09f8136aa5afdc2 (diff)
downloadWRMS-039881fdbfa69a33b27f84e8db3671fe8cfac5e6.tar.gz
WRMS-039881fdbfa69a33b27f84e8db3671fe8cfac5e6.zip
support skipping the current song while playback is paused
Diffstat (limited to 'web')
-rw-r--r--web/client.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/web/client.html b/web/client.html
index c0aef1f..8e0fa04 100644
--- a/web/client.html
+++ b/web/client.html
@@ -202,8 +202,8 @@
playing = document.getElementById("playing").innerHTML = "";
}
- function handlePlay(_currentSongs) {
- {{if .IsAdmin}} document.getElementById("ppbutton").innerHTML = 'Pause'; {{end}}
+ function handlePlayOrNext(cmd, _currentSongs) {
+ {{if .IsAdmin}}if (cmd == "play") { document.getElementById("ppbutton").innerHTML = 'Pause'; }{{end}}
if (_currentSongs == null || _currentSongs.length == 0) {
return;
@@ -257,7 +257,10 @@
handleStop()
break;
case "play":
- handlePlay(cmd.songs)
+ handlePlayOrNext("play", cmd.songs)
+ break;
+ case "next":
+ handlePlayOrNext("next", cmd.songs)
break;
case "upvoted":
handleVotes("up", cmd.songs)