UIPiPView icon indicating copy to clipboard operation
UIPiPView copied to clipboard

Support canStartPictureInPictureAutomaticallyFromInline

Open WillBishop opened this issue 2 years ago • 1 comments

Hello,

In iOS 14.2, Apple added canStartPictureInPictureAutomaticallyFromInline, so developers don't have to explicitly call PiP methods from lifecycle functions.

This would fit great in my app, where the user may leave the app without enabling PiP, where it would still be beneficial to have it. I tried to fork the repo and add canStartPictureInPictureAutomaticallyFromInline to the pipController, but it didn't work.

WillBishop avatar Jun 29 '22 01:06 WillBishop

Hi.

In UIPiPView, what is displayed in the PiP is set by explicitly calling a rendering function.

Therefore, even if canStartPictureInPictureAutomaticallyFromInline is set, PiP will not be executed because the rendering content does not exist.

I will try to create a function that will work.

uakihir0 avatar Jun 30 '22 02:06 uakihir0