<!--
{
  "availability" : [
    "iOS: 3.2.0 - 9.0.0",
    "iPadOS: 3.2.0 - 9.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPMoviePlayerController/duration",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(cs)MPMoviePlayerController(py)duration"
  },
  "title" : "duration"
}
-->

# duration

The duration of the movie, measured in seconds.

```
var duration: TimeInterval { get }
```

## Discussion

If the duration of the movie is not known, the value in this property is `0.0`. If the duration is subsequently determined, this property is updated and a [`MPMovieDurationAvailableNotification`](/documentation/MediaPlayer/MPMovieDurationAvailableNotification) notification is posted.

---

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)