Open PiP on iPad on going home screen (iOS 14.2+)

This commit is contained in:
Arkadiusz Fal 2021-12-24 20:21:42 +01:00
parent 19d57ff55c
commit f257632354

View File

@ -54,6 +54,11 @@ final class PlayerViewController: UIViewController {
playerModel.controller = self
playerView.player = playerModel.player
playerView.allowsPictureInPicturePlayback = true
#if os(iOS)
if #available(iOS 14.2, *) {
playerView.canStartPictureInPictureAutomaticallyFromInline = true
}
#endif
playerView.delegate = self
#if os(tvOS)