<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPartialAsyncProperty/duration",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "s:12AVFoundation22AVPartialAsyncPropertyCAASo7AVAssetCRbzlE8durationAA07AVAsyncD0CyxSo6CMTimeaGvpZ"
  },
  "title" : "duration"
}
-->

# duration

A time value that represents the duration of the asset.

```
static var duration: AVAsyncProperty<Root, CMTime> { get }
```

## Discussion

Use the [`load(_:isolation:)`](/documentation/AVFoundation/AVAsynchronousKeyValueLoading/load(_:isolation:)) method to retrieve the property value.

If the value of [`providesPreciseDurationAndTiming`](/documentation/AVFoundation/AVPartialAsyncProperty/providesPreciseDurationAndTiming) is <doc://com.apple.documentation/documentation/Swift/false>, the asset returns a best-available estimate of the duration. You can specify your preferred degree of precision for timing-related properties when you create an [`AVURLAsset`](/documentation/AVFoundation/AVURLAsset) by passing a value for the [`AVURLAssetPreferPreciseDurationAndTimingKey`](/documentation/AVFoundation/AVURLAssetPreferPreciseDurationAndTimingKey) initialization option.

---

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)