- Implemented a new Player class in player.js to handle audio playback, including HLS support using hls.js. - Created a shared API module in api.js for making HTTP requests with proper error handling. - Added DOM utility functions in dom.js for creating and clearing elements. - Introduced WebSocket connection handling in ws.js for real-time updates. - Developed a comprehensive CSS stylesheet for styling the application, including a high-contrast theme.
Raspberry Pi deployment
1. Install Node 20+ and clone the repo
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential python3
git clone <repo> /home/pi/onlineRadioExplorer
cd /home/pi/onlineRadioExplorer
cp .env.example .env # edit secrets
npm ci
npm run build
2. Service
sudo cp deploy/oradio.service /etc/systemd/system/oradio.service
sudo systemctl daemon-reload
sudo systemctl enable --now oradio
journalctl -u oradio -f
App listens on PORT (default 4173). Open http://<pi-ip>:4173/ for the kiosk
and http://<pi-ip>:4173/admin/ for admin.
3. Kiosk autostart (Chromium on Raspberry Pi OS)
Edit ~/.config/lxsession/LXDE-pi/autostart (or wayfire [autostart]):
@chromium-browser --kiosk --noerrdialogs --disable-infobars --app=http://localhost:4173/
Rotate the touchscreen to portrait via /boot/firmware/config.txt
(display_rotate=1) or via the desktop display settings, then size the kiosk
window/area to the 1080×660 region you reserved.