From f9ea2b6688b0312ffc8cf53407fa9c95137c51b0 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Mon, 15 Aug 2022 00:53:16 +0200 Subject: [PATCH] Minor PiP improvement --- Model/Player/Backends/AVPlayerBackend.swift | 4 +--- Shared/Player/AppleAVPlayerViewController.swift | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Model/Player/Backends/AVPlayerBackend.swift b/Model/Player/Backends/AVPlayerBackend.swift index 447ca7b9..7eb565c4 100644 --- a/Model/Player/Backends/AVPlayerBackend.swift +++ b/Model/Player/Backends/AVPlayerBackend.swift @@ -188,9 +188,7 @@ final class AVPlayerBackend: PlayerBackend { return } - DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in - self?.play() - } + play() } #endif diff --git a/Shared/Player/AppleAVPlayerViewController.swift b/Shared/Player/AppleAVPlayerViewController.swift index fb25b4ee..b528d3db 100644 --- a/Shared/Player/AppleAVPlayerViewController.swift +++ b/Shared/Player/AppleAVPlayerViewController.swift @@ -118,11 +118,11 @@ final class AppleAVPlayerViewController: UIViewController { extension AppleAVPlayerViewController: AVPlayerViewControllerDelegate { func playerViewControllerShouldDismiss(_: AVPlayerViewController) -> Bool { - true + false } func playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart(_: AVPlayerViewController) -> Bool { - true + false } func playerViewControllerWillBeginDismissalTransition(_: AVPlayerViewController) {