I'm working on Picture in Picture for a custom player, so I have to generate a AVSampleBufferDisplayLayer instance first to instantiate AVPictureInPictureController. I could not find a complete Apple demo for custom player, so I have no clue about my current weird animation: the player layer always does a scale animation before it completely stops.
In my code, I just set canStartPictureInPictureAutomaticallyFromInline to true in order to start Picture in Picture when switching to background. The only document I referred is https://developer.apple.com/documentation/avkit/adopting_picture_in_picture_in_a_custom_player
I've tried many ways but none can remove this weird animation. 