<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/AVPlayerViewControllerDelegate/playerViewController(_:willPresent:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "c:objc(pl)AVPlayerViewControllerDelegate(im)playerViewController:willPresentInterstitialTimeRange:"
  },
  "title" : "playerViewController(_:willPresent:)"
}
-->

# playerViewController(_:willPresent:)

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

```
optional func playerViewController(_ playerViewController: AVPlayerViewController, willPresent interstitial: AVInterstitialTimeRange)
```

## Parameters

`playerViewController`

The player view controller.

`interstitial`

The time range of interstitial content that’s about to begin.

## Discussion

Interstitial content is material unrelated to the main content of a presentation that may have special playback options or requirements. For example, implement this method to record when a user begins viewing an advertisement, or to enable the player view controller’s [`requiresLinearPlayback`](/documentation/AVKit/AVPlayerViewController/requiresLinearPlayback) property to prevent skipping mandatory legal notices.

Use the <doc://com.apple.documentation/documentation/AVFoundation/AVPlayerItem/interstitialTimeRanges> property to identify the time ranges of interstitial content in the media timeline.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)