1

I have tried with below mentioned code snippet. This code will execute when clicking on minimise button that I have created. But picture in picture mode is not working. Is there any errors in this code?

AVPictureInPictureVideoCallViewController *hello= [[AVPictureInPictureVideoCallViewController alloc] init];
hello.preferredContentSize = CGSizeMake(300, 400);
[hello.view addSubview:self.view];
AVPictureInPictureControllerContentSource *contentSource = [[AVPictureInPictureControllerContentSource alloc] initWithActiveVideoCallSourceView:self.view contentViewController:hello];
self.pictureInPictureController = [[AVPictureInPictureController alloc] initWithContentSource:contentSource];
self.pictureInPictureController.delegate = self;
self.pictureInPictureController.canStartPictureInPictureAutomaticallyFromInline = YES;
[self.pictureInPictureController startPictureInPicture];

This self.pictureInPictureController is AVPictureInPictureController.

I need a proper answer for implement picture in picture mode for video call view.

The Dreams Wind
  • 8,416
  • 2
  • 19
  • 49

0 Answers0