From 6657d1afab3de10cc82d9374de1ab4f377cd5579 Mon Sep 17 00:00:00 2001 From: luciano Date: Tue, 30 Jun 2026 12:27:41 +0200 Subject: [PATCH] Mobile: live external audio input (USB) source selector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expose the engine's live-input mode on the remote: an "Sorgente audio" selector in the Audio tab lists the input devices the output reports and switches between File/Playlist and a live USB capture (useInput); picking File again stops the input. Grant the kiosk getUserMedia access with --use-fake-ui-for-media-stream so device enumeration/labels work without a prompt. Make reportDevices resilient (per-probe timeout, always report even an empty list) so the UI gets feedback when no input is connected yet. The Pi 5 has no audio input — a USB (line) sound card is required; visuals react to the source while the audio stays on the mixer. Co-Authored-By: Claude Opus 4.8 --- public/css/mobile.css | 1 + public/index.html | 7 +++++++ public/js/control.js | 22 ++++++++++++++++++++++ public/js/output.js | 16 ++++++++++------ scripts/kiosk.sh | 1 + 5 files changed, 41 insertions(+), 6 deletions(-) diff --git a/public/css/mobile.css b/public/css/mobile.css index 974fc4a..75b7cdc 100644 --- a/public/css/mobile.css +++ b/public/css/mobile.css @@ -34,6 +34,7 @@ button, select, input, textarea { button { cursor: pointer; } button:active { filter: brightness(1.3); } button.wide { width: 100%; margin-top: 10px; font-size: 15px; } +#audio-src { width: 100%; } input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; padding: 0; height: 34px; border: none; } input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 4px; background: rgba(255,255,255,.14); } input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); margin-top: -9px; box-shadow: 0 1px 4px rgba(0,0,0,.5); } diff --git a/public/index.html b/public/index.html index 265bbb3..d7076fc 100644 --- a/public/index.html +++ b/public/index.html @@ -90,6 +90,13 @@