Skip to content

feat: let stop() preserve display criteria - #128

Merged
superuser404notfound merged 1 commit into
superuser404notfound:mainfrom
brandomoore:feat/preserve-display-on-stop
Jul 17, 2026
Merged

superuser404notfound merged 1 commit into
superuser404notfound:mainfrom
brandomoore:feat/preserve-display-on-stop

Conversation

@brandomoore

Copy link
Copy Markdown
Contributor

Clearing preferredDisplayCriteria during a same-mode handoff seems to make tvOS drop to SDR and immediately switch back to Dolby Vision.

This exposes resetDisplayCriteria on public stop(), defaulting to true, so existing behavior stays unchanged while callers can preserve the current mode when the next item matches.

I tested this on a real Apple TV with a Dolby Vision → Dolby Vision handoff, and it avoided the extra switch there.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 59cd4472-c79d-4e7c-92ff-98a00996ca3c
@superuser404notfound
superuser404notfound merged commit c022bf5 into superuser404notfound:main Jul 17, 2026
3 checks passed
@superuser404notfound

Copy link
Copy Markdown
Owner

Merged, thanks a lot for the clean fix and for verifying the DV to DV handoff on real hardware! Nice catch on the SDR bounce. I will add a doc comment on the new parameter and look at the engine's internal load-over-load seam (which resets criteria the same way) as a follow-up.

superuser404notfound pushed a commit that referenced this pull request Jul 17, 2026
@superuser404notfound

Copy link
Copy Markdown
Owner

Follow-up shipped: the engine's own load-over-load seam had the same root cause (load() reset the criteria via stopInternal before apply() re-negotiated), so back-to-back load() calls now preserve the criteria too. Audio-only sessions and suppressed hosts clear a leftover criteria at routing time instead. Both changes are released in 5.4.0. Feel free to confirm the handoff on your setup with the release tag.

ijuniorfu pushed a commit to ijuniorfu/AetherEngine that referenced this pull request Jul 18, 2026
…user404notfound#128 follow-up)

load() nil-ed the previous session's preferredDisplayCriteria in
stopInternal before apply() re-negotiated the new mode, bouncing the
panel through SDR on every same-mode video-to-video reload (the seam
Sodalite's next-episode flow uses). PR superuser404notfound#128 fixed the explicit
stop()/load() handoff; this applies the same treatment to the engine's
own seam.

The load seam now preserves the criteria and the cleanup decision moves
to routing time via loadDisplayCriteriaAction (pure, unit-tested):

- Engine-writer video path: apply() overwrites the criteria in place,
  single handshake, none when the mode matches.
- Audio-only fast path: clear the stale criteria so music playback
  cannot keep the panel in DV/HDR (engine is a process-wide singleton).
- Suppressed (AVKit-sole-writer) host: clear it before AVKit writes its
  own so the two writers cannot fight; didApply-gated no-op for hosts
  that always suppress.

A load() that throws before routing leaves the criteria for stop() to
clear, same panel mode the failed session requested anyway.

Also documents the new stop(resetDisplayCriteria:) parameter contract
and the handoff behavior in the README host-setup section.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018PEEQm5QvBSZ97YZZo4BLv
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.

2 participants