Protocol

AVPictureInPictureControllerDelegate

The protocol that defines the methods to respond to Picture in Picture events.

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

- pictureInPictureController:restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:

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

- pictureInPictureControllerWillStartPictureInPicture:

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

- pictureInPictureControllerDidStartPictureInPicture:

Tells the delegate that Picture in Picture playback has started.

- pictureInPictureControllerWillStopPictureInPicture:

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

- pictureInPictureControllerDidStopPictureInPicture:

Tells the delegate when Picture in Picture playback stops.

- pictureInPictureController:failedToStartPictureInPictureWithError:

Tells the delegate whether Picture in Picture failed to start.

Relationships

Inherits From

See Also

Creating and Configuring a Picture in Picture Controller

- initWithPlayerLayer:

Creates a new Picture in Picture controller.

delegate

The Picture in Picture controller’s delegate object.

playerLayer

The player layer that displays the media to play.