Always restore from PiP to expanded player window on macOS

The PiP restore handler only expanded the player when mini player
video was disabled, which is the iOS behavior where playback can
continue in the mini player. On macOS the mini player is not a
restore target, so always reopen the player window; iOS keeps the
existing logic.
This commit is contained in:
Arkadiusz Fal
2026-06-17 19:05:03 +02:00
parent 5556be0504
commit ea1aa6fe7e

View File

@@ -2130,11 +2130,17 @@ final class PlayerService {
// Configure PiP callbacks
if let coordinator = navigationCoordinator {
mpvBackend.onRestoreFromPiP = { [weak coordinator] in
#if os(macOS)
// On macOS, always restore into the expanded player window
// the mini player is not a restore target there
coordinator?.expandPlayer()
#else
// If mini player video is disabled, expand player for restore
// Otherwise video continues in mini player
if MiniPlayerSettings.cached.showVideo == false {
coordinator?.expandPlayer()
}
#endif
}
mpvBackend.onPiPDidStart = { [weak coordinator] in
guard let coordinator else {