Instance Method

playerViewControllerWillStartPictureInPicture(_:)

Tells the delegate Picture in Picture is about to start.

Declaration

optional func playerViewControllerWillStartPictureInPicture(_ playerViewController: AVPlayerViewController)

Parameters

playerViewController

The player view controller to which you’ve assigned the delegate.

Discussion

This method is called when Picture in Picture is about to start. You can use this callback as a notice to update the state of your main player UI such as hiding or disabling playback controls.

See Also

Responding to Picture in Picture Playback Events

func playerViewControllerDidStartPictureInPicture(AVPlayerViewController)

Tells the delegate Picture in Picture playback has started.

func playerViewControllerWillStopPictureInPicture(AVPlayerViewController)

Tells the delegate Picture in Picture is about to stop.

func playerViewControllerDidStopPictureInPicture(AVPlayerViewController)

Tells the delegate Picture in Picture playback has stopped and the stopping animation has finished.