Instance Method

playerViewControllerWillStopPictureInPicture(_:)

Tells the delegate Picture in Picture is about to stop.

Declaration

optional func playerViewControllerWillStopPictureInPicture(_ 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 stop. You can use this callback as a notice to update the state of your main player UI such as presenting or enabling playback controls.

See Also

Responding to Picture in Picture Playback Events

func playerViewControllerWillStartPictureInPicture(AVPlayerViewController)

Tells the delegate Picture in Picture is about to start.

func playerViewControllerDidStartPictureInPicture(AVPlayerViewController)

Tells the delegate Picture in Picture playback has started.

func playerViewControllerDidStopPictureInPicture(AVPlayerViewController)

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