While working on an app that uses a custom player based on AVFoundation
, ie not based on AVPlayerViewController
, I was unable to get picture-in-picture to start while the app was in the background with Group Activities.
It turns out we were initiating and configuring our AVPictureInPictureController
after coordinating our GroupSession
with the players AVPlayerPlaybackCoordinator
.
Once we setup the picture-in-picture controller first, then coordinated the group session, background picture-in-picture started working.
Hope this helps others in the same situation.