---
title: duration
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avplayeritemintegratedtimelinesnapshot/duration
---

# duration

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

## Declaration

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

## Discussion

Discussion The duration property takes into account the interstitial event’s playoutLimit and resumptionOffset values. Before loading the duration of the primary item, the value of this property is invalid. For livestreams, this value is indefinite.

## See Also

### Inspecting the snapshot

- [currentSegment](avfoundation/avplayeritemintegratedtimelinesnapshot/currentsegment.md)
- [segments](avfoundation/avplayeritemintegratedtimelinesnapshot/segments.md)
- [AVPlayerItemSegment](avfoundation/avplayeritemsegment.md)
- [currentTime](avfoundation/avplayeritemintegratedtimelinesnapshot/currenttime.md)
- [currentDate](avfoundation/avplayeritemintegratedtimelinesnapshot/currentdate.md)
