From 43100989491d0250826a39da20d8981e8382261b Mon Sep 17 00:00:00 2001 From: ru-aish Date: Wed, 11 Feb 2026 17:27:13 +0530 Subject: [PATCH] Fix background playback: remove duplicate hidden-tab play effect --- src/hooks/audio/useBackgroundState.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/hooks/audio/useBackgroundState.ts b/src/hooks/audio/useBackgroundState.ts index 5831dc4..7eafa7a 100644 --- a/src/hooks/audio/useBackgroundState.ts +++ b/src/hooks/audio/useBackgroundState.ts @@ -34,20 +34,5 @@ export function useBackgroundState({ activeHowl, isPlaying, keepPlayingInBackgro }; }, [isPlaying, activeHowl, keepPlayingInBackground]); - useEffect(() => { - if (!document.hidden || !activeHowl || !isPlaying) return; - - if (keepPlayingInBackground) { - if (!activeHowl.playing()) { - activeHowl.play(); - } - return; - } - - if (activeHowl.playing()) { - activeHowl.pause(); - } - }, [activeHowl, isPlaying, keepPlayingInBackground]); - return isBackgrounded; }