AVFoundationPiPPlayer: Picture-in-Picture Playback with AVKit

Last Revision:
Version 1.3, 2016-11-03
Updated for Swift 2.3
(Full Revision History)
Build Requirements:
Xcode 7.3, iOS 9.0 SDK
Runtime Requirements:
iOS 9.0

Demonstrates how to use the AVPictureInPictureController class to implement picture-in-picture video playback. It shows the steps required to start and stop picture-in-picture mode and to setup a delegate to receive event callbacks. Clients of AVFoundation using the AVPlayerLayer class for media playback must use the AVPictureInPictureController class, whereas clients of AVKit who use the AVPlayerViewController class get picture-in-picture mode without any additional setup.