showergel
showergel copied to clipboard
Now playing page
It would be great to enhance the "Now playing page" in some ways:
-
style the part with the song/program currently played like a real player (this one i strictly frontend)
-
add a loading/error state to deal with the API response
-
add the list of next songs/programs. For this one, it would require some data from the backend: I suggest another endpoint (maybe something like
/playlist
?) which would be called only when the song/program is about to end or if the user press theskip
button.
Hello,
As the current page is the very first functional version, it could surely be improved... but it's complicated.
style the part with the song/program currently played like a real player (this one i strictly frontend)
What do you mean by like a real player ? Be careful that incoming data is hard to predict: "artist" and "title" might be missing (when playing jingles the page only show the source name), or very long. The current presentation, that just prints all this in big letters, isn't nice but very adaptative. Yesterday I've set it up on a screen in the studio, so producers can know what's played by the autoDJ before going live, they were enthusiast already.
In other words, I guess it will be hard to have this page both functional and nice. But that's just my warning :)
add a loading/error state to deal with the API response
This could be minimalist because:
- the page is made to be open on
localhost
from the machine running Liquidsoap ; the (re)loading time is far from noticeable - I'm even considering to set the reloading delay as a parameter, because in a 100% local setting 100ms would be better. - error states should be considered as bugs. This page should be left open on a screen forever: if it fails to tell what's going on, it's a bug
add the list of next songs/programs. For this one, it would require some data from the backend: I suggest another endpoint (maybe something like
/playlist
?) which would be called only when the song/program is about to end or if the user press theskip
button.
Well, that data does not exist: Liquidsoap does not predict what it will play. It's a like a stream generation function.
Even when Showergel will include a scheduler, I think we shouldn't go farther than displaying the next action scheduled (along /live
), because Showergel cannot predict what will happen in the script. And having users write their Liquidsoap script is a fundamental design choice in Showergel. It's here to schedule what cannot be implemented with Liquidsoap's
scheduling functions, ie. occasional actions/programs. Should showergel schedule 100% of programs, it would just be yet another AzuraCast/LibreTime/... Maybe I should start a documentation page about "The separation between Liquidsoap and Showergel", to discuss such implications.
So the goal is to look better than that ;-)