stream: make the web player installable as a PWA

Wire up a web manifest, service worker and icon routes so the player can
be installed on mobile. The static manifest stays generic; the page
regenerates it at runtime from STATION_NAME so an instance keeps its name.
The service worker only caches the app shell, never the live stream or the
playback APIs. Icons (192/512, maskable and apple-touch) are rasterized
from the favicon.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
nemunaire 2026-07-04 16:09:08 +08:00
commit c73b71d32f
10 changed files with 239 additions and 0 deletions

View file

@ -3,5 +3,11 @@ FROM savonet/liquidsoap:v2.4.5
COPY radio.liq /etc/liquidsoap/radio.liq
COPY index.html /etc/liquidsoap/index.html
COPY favicon.svg /etc/liquidsoap/favicon.svg
COPY manifest.webmanifest /etc/liquidsoap/manifest.webmanifest
COPY sw.js /etc/liquidsoap/sw.js
COPY icon-192.png /etc/liquidsoap/icon-192.png
COPY icon-512.png /etc/liquidsoap/icon-512.png
COPY icon-maskable-512.png /etc/liquidsoap/icon-maskable-512.png
COPY apple-touch-icon.png /etc/liquidsoap/apple-touch-icon.png
CMD ["/etc/liquidsoap/radio.liq"]