From 9d5dce1ba79a0248111c60e408375d84614e70f4 Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Mon, 16 Nov 2026 18:54:15 -0500 Subject: [PATCH] fix(mobile): only take over audio when playback starts Restoring a paused queue activated the iOS audio session, which stopped other apps' audio on launch. play() already activates it. Co-Authored-By: Claude Opus 5.5 --- apps/mobile/contexts/playback.tsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/apps/mobile/contexts/playback.tsx b/apps/mobile/contexts/playback.tsx index 96241e8..0919cec 100644 --- a/apps/mobile/contexts/playback.tsx +++ b/apps/mobile/contexts/playback.tsx @@ -2,7 +2,6 @@ import { dolbyAtmosSupported } from "@/lib/playback-capabilities" import { createAudioPlaylist, setAudioModeAsync, - setIsAudioActiveAsync, type AudioMetadata, type AudioPlaylist, type AudioPlaylistStatus, @@ -801,15 +800,9 @@ export function PlaybackProvider({ children }: { children: ReactNode }) { setIsPlayingState(true) playlist.play() } else { + // Activating the session here would stop other apps' audio. + // `play()` activates it (iOS) and requests focus (Android). playlist.pause() - // Enable audio for the restored queue without starting playback. - try { - await setIsAudioActiveAsync(true) - } catch { - if (isCurrentLoad()) { - showError("Audio playback could not be initialized.") - } - } } }