Skip to content

tvOS PiP background keepalive with wedge-safe teardown on PiP end - #157

Merged
superuser404notfound merged 1 commit into
mainfrom
feature/tvos-pip-keepalive
Jul 20, 2026
Merged

tvOS PiP background keepalive with wedge-safe teardown on PiP end#157
superuser404notfound merged 1 commit into
mainfrom
feature/tvos-pip-keepalive

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

An active PiP window (pictureInPictureActive, set by the host from its PiP delegate) now keeps the video pipeline and loopback server alive across tvOS backgrounding via the new shouldKeepVideoAliveTV(enabled:pipActive:) policy. When the PiP window closes while the app is still backgrounded, the flag's didSet runs the wedge-safe teardownVideoForBackground() before idle suspension, so nothing crosses a multi-hour suspension (the mediaserverd wedge history stays covered). Without active PiP, tvOS background behavior is unchanged: no grace window, no background-audio case. isBackgrounded and the foreground reset are now cross-platform. Covered by BackgroundKeepaliveTests (3 new cases); full suite 781 green, tvOS sim build clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NAPCg4tCDdSqkK6tPkNptw

…wn on PiP end

An active PiP window (pictureInPictureActive, set by the host) now keeps
the video pipeline and loopback server alive across tvOS backgrounding
via the new shouldKeepVideoAliveTV policy; when the PiP window closes
while backgrounded the didSet runs teardownVideoForBackground before
idle suspension. Without active PiP the unconditional teardown is
unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NAPCg4tCDdSqkK6tPkNptw
@superuser404notfound
superuser404notfound merged commit 423af4f into main Jul 20, 2026
3 checks passed
@superuser404notfound
superuser404notfound deleted the feature/tvos-pip-keepalive branch July 20, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant