5.4.0
Minor release: same-mode handoffs keep the panel's HDMI mode instead of bouncing through SDR.
Added
-
stop(resetDisplayCriteria:)lets a handoff stop preserve the display criteria (#128). Nil-ingpreferredDisplayCriteriaduring a same-mode stop()/load() handoff made tvOS drop the panel to SDR and immediately re-negotiate the same Dolby Vision mode.stop(resetDisplayCriteria: false)keeps the criteria on AVDisplayManager so the nextload()overwrites it in place: a single handshake when the mode changes, none when it matches. The plainstop()default is unchanged and still returns the panel to its default mode, which is what hosts want when leaving playback for the app UI.Thanks to @thatcube for the fix, including verifying the Dolby Vision to Dolby Vision handoff on real hardware.
Fixed
-
Back-to-back
load()calls no longer bounce the panel through SDR (#128 follow-up). The engine's own load-over-load seam (a next-episode handoff that reloads in place, without an explicitstop()) reset the criteria the same way beforeapply()re-negotiated the new mode. The seam now preserves the criteria, and the cleanup decision moves to routing time:- Engine-writer video path:
apply()overwrites the preserved criteria in place. - Audio-only sessions: a leftover video-session criteria is cleared, so music playback cannot keep the panel in DV/HDR (the engine is a process-wide singleton).
- Suppressed (
suppressDisplayCriteria: true, AVKit-sole-writer) hosts: a leftover engine criteria is cleared before AVKit writes its own, so the two writers cannot fight. No-op for hosts that always suppress.
- Engine-writer video path:
Compatibility
Additive API only (stop() gains a defaulted parameter; existing call sites compile and behave unchanged). Behavior note: a load() that throws before routing now leaves the previous criteria applied until stop() clears it; previously the panel dropped to default at load entry regardless of outcome.