Expose Background Playback toggle on tvOS, default off

Surfaces the existing iOS/macOS Background Playback setting in the tvOS
Playback settings, defaulting to off so audio stops when the user leaves
the app via the TV button. Pauses playback on .background/.inactive when
the toggle is off, regardless of audio route — the user's setting wins
over AirPlay/HomePod handoff. Also auto-shows the tvOS player controls
when returning to foreground so the paused state is immediately visible
and actionable.
This commit is contained in:
Arkadiusz Fal
2026-05-09 14:50:38 +02:00
parent 8a3f76bb1d
commit aabf5313fa
4 changed files with 26 additions and 3 deletions

View File

@@ -271,12 +271,10 @@ private struct BehaviorSection: View {
}
}
#if os(iOS) || os(macOS)
Toggle(
String(localized: "settings.playback.backgroundPlayback"),
isOn: $settings.backgroundPlaybackEnabled
)
#endif
#if os(tvOS)
Toggle(