From d18e38800edf38c0e016f970db4c90c0cc4c93ab Mon Sep 17 00:00:00 2001 From: Smittix Date: Wed, 4 Feb 2026 11:12:46 +0000 Subject: [PATCH] Retry listen playback without fallback --- static/js/modes/listening-post.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/static/js/modes/listening-post.js b/static/js/modes/listening-post.js index aa8fc28..97049fc 100644 --- a/static/js/modes/listening-post.js +++ b/static/js/modes/listening-post.js @@ -2155,22 +2155,15 @@ async function _startDirectListenInternal() { // Also try to play immediately (some browsers need this) attemptAudioPlay(audioPlayer); - // Fallback: if stream never starts, try fetch-based stream + // If stream is slow, retry play and prompt for manual unlock setTimeout(async () => { if (!isDirectListening || !audioPlayer) return; if (audioPlayer.readyState > 0) return; - console.warn('[LISTEN] HTTP stream not ready, attempting fetch stream fallback'); - const fetchOk = await startFetchAudioStream(streamUrl, audioPlayer); - if (fetchOk) return; - console.warn('[LISTEN] Fetch stream failed, attempting WebSocket audio fallback'); - await startWebSocketListen({ - frequency: freq, - modulation: currentModulation, - squelch: squelch, - gain: gain, - device: device - }, audioPlayer); - }, 1500); + console.warn('[LISTEN] Stream slow to start, retrying playback'); + audioPlayer.load(); + attemptAudioPlay(audioPlayer); + showAudioUnlock(audioPlayer); + }, 2500); // Initialize audio visualizer to feed signal levels to synthesizer initAudioVisualizer();