<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayerInterstitialEvent/templateItems",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerInterstitialEvent(py)templateItems"
  },
  "title" : "templateItems"
}
-->

# templateItems

An array of player item configurations to use as templates for player items that play interstitial content.

```
var templateItems: [AVPlayerItem] { get set }
```

## Discussion

If you require the system to create new player items using the same asset instance as the template item, create the asset with an [`AVURLAssetPrimarySessionIdentifierKey`](/documentation/AVFoundation/AVURLAssetPrimarySessionIdentifierKey) value equal to [`httpSessionIdentifier`](/documentation/AVFoundation/AVURLAsset/httpSessionIdentifier) of the primary item’s [`asset`](/documentation/AVFoundation/AVPlayerItem/asset). Creating assets this way simplifies cases where you require loading their data with a custom [`AVAssetResourceLoader`](/documentation/AVFoundation/AVAssetResourceLoader) delegate.

> Important:
> The system raises an exception if template items contain assets that aren’t URL based, such as ``doc://com.apple.avfoundation/documentation/AVFoundation/AVComposition``.

---

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)