From 78fd62e7c0caeb6a7c7ba0cee90d24a556c241b6 Mon Sep 17 00:00:00 2001 From: baschi29 Date: Wed, 13 May 2026 09:00:11 +0200 Subject: [PATCH] declare playback as audioSession.type, fixes #161 --- src/components/SnapWeb.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/SnapWeb.tsx b/src/components/SnapWeb.tsx index 73a302e..57eea92 100644 --- a/src/components/SnapWeb.tsx +++ b/src/components/SnapWeb.tsx @@ -113,6 +113,11 @@ export default function SnapWeb() { setTheme(config.theme); }); + // Set AudioSession type to playback to enable background playback on iOS + if ("audioSession" in navigator) { + ((navigator.audioSession as any).type as string) = "playback"; + } + useEffect(() => { console.debug("server updated"); }, [server]);