---
title: duration
framework: mediaplayer
role: symbol
role_heading: Instance Property
path: mediaplayer/mpmovieplayercontroller/duration
---

# duration

The duration of the movie, measured in seconds.

## Declaration

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

## Discussion

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 notification is posted.

## See Also

### Accessing the movie duration

- [playableDuration](mediaplayer/mpmovieplayercontroller/playableduration.md)
