Instance Method


Tells the delegate the player view controller has completed playing a range of interstitial content.


optional func playerViewController(_ playerViewController: AVPlayerViewController, didPresent interstitial: AVInterstitialTimeRange)



The player view controller to which you’ve assigned the delegate.


The time range of interstitial content that has finished playback.


Interstitial content is material unrelated to the main content of a presentation that may have special playback options or requirements. For example, you can use this method to record when the user has viewed an advertisement, or to disable the player view controller’s requiresLinearPlayback property after presenting mandatory legal notices.

Use the interstitialTimeRanges property to identify time ranges for interstitial content in the AVPlayerItem object presented in the player view controller.

See Also

Responding to Interstitial Content Playback Events

func playerViewController(AVPlayerViewController, willPresent: AVInterstitialTimeRange)

Tells the delegate the player view controller is about to begin playing a range of interstitial content.