AVPictureInPictureController
A controller that responds to user-initiated Picture in Picture playback of video in a floating, resizable window.
Declaration
class AVPictureInPictureControllerMentioned in
Overview
To use Picture in Picture, you need to configure your app to support background audio playback. See Configuring your app for media playback for more details.
Before presenting a user interface to start Picture in Picture, call the isPictureInPictureSupported() method to determine if the current device supports the feature, and check the isPictureInPicturePossible property value to determine whether PiP is possible in the current context.
Topics
Creating a controller
Configuring the content source
Accessing the player layer
Configuring playback behavior
Accessing the delegate object
Accessing Picture in Picture state
isPictureInPictureSupported()isPictureInPicturePossibleisPictureInPictureActiveisPictureInPictureSuspended
Controlling Picture in Picture playback
canStopPictureInPicturecanStartPictureInPictureAutomaticallyFromInlinestartPictureInPicture()stopPictureInPicture()invalidatePlaybackState()
Retrieving Picture in Picture template images
See Also
Picture in Picture
Adopting Picture in Picture in a standard playerAdopting Picture in Picture in a custom playerAdopting Picture in Picture for video callsAdopting Picture in Picture playback in tvOSAVPictureInPictureControllerDelegateAVPictureInPictureSampleBufferPlaybackDelegateAVPictureInPictureVideoCallViewControllerAVPlayerViewPictureInPictureDelegate