AVPictureInPictureController not working on macOS with AVSampleBufferDisplayLayer ContentSource

I have an iOS app that includes Picture in Picture. Everything works great there.

However, when running this same app on macOS (Apple Silicon, Designed for iPad), it does not work properly. Here, it only works in the scenarios where I initiate AVPictureInPictureController with an AVPlayerLayer, but not if I initiate it with a ContentSource of type AVSampleBufferDisplayLayer. In this case, the AVPictureInPictureController.isPictureInPicturePossible observer remains false, and thus PiP cannot be started.

I have double checked that everything is setup properly, and the fact that it runs flawlessly on iOS further confirms this.

Can anyone tell me why it is not working?

Post not yet marked as solved Up vote post of antome Down vote post of antome
559 views