Protocol

AVPictureInPictureControllerDelegate

Methods you can implement to configure your app’s user interface to respond to user interactions for Picture in Picture on iPad.

Declaration

protocol AVPictureInPictureControllerDelegate

Overview

Adopt this protocol in a custom object, and assign the object as the delegate of your AVPictureInPictureController instance.

Topics

Managing Your App’s UI for Picture in Picture

func pictureInPictureController(AVPictureInPictureController, restoreUserInterfaceForPictureInPictureStopWithCompletionHandler: (Bool) -> Void)

Tells the delegate when Picture in Picture is about to stop, to give your app an opportunity to restore its video playback user interface.

Responding to Picture in Picture Playback Events

func pictureInPictureControllerWillStartPictureInPicture(AVPictureInPictureController)

Tells the delegate when Picture in Picture is about to start.

func pictureInPictureControllerDidStartPictureInPicture(AVPictureInPictureController)

Tells the delegate when Picture in Picture playback has started.

func pictureInPictureControllerWillStopPictureInPicture(AVPictureInPictureController)

Tells the delegate when Picture in Picture is about to stop.

func pictureInPictureControllerDidStopPictureInPicture(AVPictureInPictureController)

Tells the delegate when Picture in Picture playback stops.

Relationships

Inherits From

See Also

Creating and Configuring a Picture in Picture Controller

init?(playerLayer: AVPlayerLayer)

The designated initializer for a Picture in Picture controller.

var delegate: AVPictureInPictureControllerDelegate?

The delegate object for the Picture in Picture controller.

var playerLayer: AVPlayerLayer

The AVPlayerLayer instance containing the media to play.