From ca602de0aeb506d640a12912d792ef5adaee4724 Mon Sep 17 00:00:00 2001 From: James Pine Date: Sun, 15 Mar 2026 09:29:44 -0700 Subject: [PATCH] fix: don't reset audio player when unmuting during playback --- landing/src/components/LandingAudioPlayer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/landing/src/components/LandingAudioPlayer.tsx b/landing/src/components/LandingAudioPlayer.tsx index a92cd443..d240fc4a 100644 --- a/landing/src/components/LandingAudioPlayer.tsx +++ b/landing/src/components/LandingAudioPlayer.tsx @@ -20,7 +20,9 @@ export function unlockAudioContext() { audioUnlocked = true; // Unlock WaveSurfer's internal audio element - if (sharedWaveSurfer) { + // Skip if already playing — the context is already unlocked and the + // play/pause/reset dance would destroy the active playback. + if (sharedWaveSurfer && !sharedWaveSurfer.isPlaying()) { const media = sharedWaveSurfer.getMediaElement(); if (media) { media.muted = true;