Contents

startPictureInPicture()

Starts Picture in Picture, if possible.

Declaration

func startPictureInPicture()

Mentioned in

Discussion

When you call this method and Picture in Picture (PiP) is possible, your delegate receives a call to its pictureInPictureControllerWillStartPictureInPicture(_:) method. After a successful start, your delegate receives a call to the pictureInPictureControllerDidStartPictureInPicture(_:) method.

If PiP fails, your delegate receives a call to the pictureInPictureController(_:failedToStartPictureInPictureWithError:)method.

Whether you explicitly stop PiP, the user stops it through interaction, or the system stops it, your delegate receives a call to the pictureInPictureControllerWillStopPictureInPicture(_:) method, followed by the pictureInPictureControllerDidStopPictureInPicture(_:) method after the PiP stop animation completes.

See Also

Controlling Picture in Picture Playback