From 5b12dbcb1eaffcc009381a345725190b22d59746 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Fri, 7 Jan 2022 19:48:03 +0100 Subject: [PATCH] Pause before dismissing player on tvOS --- Shared/Player/PlayerViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Shared/Player/PlayerViewController.swift b/Shared/Player/PlayerViewController.swift index 8146ff1b..26bf3211 100644 --- a/Shared/Player/PlayerViewController.swift +++ b/Shared/Player/PlayerViewController.swift @@ -127,6 +127,9 @@ extension PlayerViewController: AVPlayerViewControllerDelegate { } func playerViewControllerWillBeginDismissalTransition(_: AVPlayerViewController) { + if Defaults[.pauseOnHidingPlayer] { + playerModel.pause() + } dismiss(animated: false) }