Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

SayoniSDR

macrumors newbie
Original poster
Jul 7, 2019
1
0
I have developed a sample ios application using AVPlayer as an underlying framework. I have successfully implemented picture in picture playback using AVPictureInPictureController as well.

But the problem arises, when I switch to the next content in the playlist after the initial content finishes playing in PictureInPictureMode. At this point, the player automatically switches to the full screen mode and the delegate method : pictureInPictureControllerWillStopPictureInPicture is called.

I want the next content to continue playing in PIP mode. Can anyone tell me under what conditions, the delegate method:pictureInPictureControllerWillStopPictureInPicture is called.
 

Mascots

macrumors 68000
Sep 5, 2009
1,667
1,418
Talk about a method name...

I'm not too sure because I haven't worked too extensively with AVPlayer - but before that method is called, is the playerDidFinishPlaying notification fired? Perhaps you can handle the hand-off before the check that causes pictureInPictureControllerWillStopPictureInPicture to fire and close the PIP window. I assume that there are other apps that do this?

Sorry I can't be of more help
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.