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

# duration

The total duration of the primary item and scheduled interstitial events.

```
var duration: CMTime { get }
```

## Discussion

The duration property takes into account the interstitial event’s [`playoutLimit`](/documentation/AVFoundation/AVPlayerInterstitialEvent/playoutLimit) and [`resumptionOffset`](/documentation/AVFoundation/AVPlayerInterstitialEvent/resumptionOffset) values.

Before loading the duration of the primary item, the value of this property is <doc://com.apple.documentation/documentation/CoreMedia/CMTime/invalid>. For livestreams, this value is <doc://com.apple.documentation/documentation/CoreMedia/CMTime/indefinite>.

---

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)