diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2022-08-01 22:51:38 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2022-08-01 22:51:38 +0200 |
| commit | a315477b92d2c6f96c5b4d2b25e2447f250f9682 (patch) | |
| tree | 9ab90bf7b699baa6dc99c7ef5c1241b314999068 | |
| parent | 5900302b27ef2ee45bfe14c7184f78706b863931 (diff) | |
| download | WRMS-a315477b92d2c6f96c5b4d2b25e2447f250f9682.tar.gz WRMS-a315477b92d2c6f96c5b4d2b25e2447f250f9682.zip | |
add and handle stop event
| -rw-r--r-- | web/client.html | 5 | ||||
| -rw-r--r-- | wrms.go | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/web/client.html b/web/client.html index 9998940..20a53ed 100644 --- a/web/client.html +++ b/web/client.html @@ -166,6 +166,11 @@ document.getElementById("ppbutton").innerHTML = 'Play'; } + function handleStop() { + document.getElementById("ppbutton").innerHTML = 'Play'; + playing = document.getElementById("playing").innerHTML = ""; + } + function handlePlay(currentSong) { document.getElementById("ppbutton").innerHTML = 'Pause'; @@ -121,6 +121,7 @@ func (wrms *Wrms) PlayPause() { wrms.Next() if wrms.CurrentSong.Uri == "" { llog.Info("No song left to play") + wrms.Broadcast(Event{"stop", []Song{}}) return } } |
