We have determined the root cause of the problems
AVAudioSession.sharedInstance().setActive(true) must be called before the AVPictureInPictureController is initialised.
The frame size for the AVPlayerLayer must have a aspect ratio no greater than 16/9 (filed as a separate bug, rdar//8689203)
I hope this will be useful information to others experiencing similar issues. While both of these issues seems intentional by Apple, these side effects need to be documented or trigger proper asserts and/or log statements so developers can solve the issues on their end.
Topic:
App & System Services
SubTopic:
Core OS
Tags: