Hi guys,
Based on the documentations looks like possible to implement Picture in Picture in tvOS on the same way as on iOS/iPadOS.
So, I tried to implement it yesterday but for some reasons when I'm calling "startPictureInPicture" it's not starting and I'm receiving "false" from "isPictureInPicturePossible"
Below the code that I used for setup PiP:
Based on the documentations looks like possible to implement Picture in Picture in tvOS on the same way as on iOS/iPadOS.
So, I tried to implement it yesterday but for some reasons when I'm calling "startPictureInPicture" it's not starting and I'm receiving "false" from "isPictureInPicturePossible"
Below the code that I used for setup PiP:
Code Block func setupPictureInPicture() { // Ensure PiP is supported by current device if AVPictureInPictureController.isPictureInPictureSupported() { // Create new controller passing reference to the AVPlayerLayer if let playerLayer = playerLayer { pictureInPictureController = AVPictureInPictureController(playerLayer: playerLayer)! pictureInPictureController.delegate = self } } else { // PiP not supported by current device. Disable PiP button. print("PIP NOT SUPPORTED BY CURRENT DEVICE") } }