<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPPlaybackConfiguration/init(preferredPresentation:playbackAction:elapsedTime:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPPlaybackConfiguration(im)initWithPreferredPresentation:playbackAction:elapsedTime:duration:"
  },
  "title" : "init(preferredPresentation:playbackAction:elapsedTime:duration:)"
}
-->

# init(preferredPresentation:playbackAction:elapsedTime:duration:)

Initialize a description of the playable media content that is represented by template items.

```
init(preferredPresentation: CPPlaybackConfiguration.Presentation, playbackAction: CPPlaybackConfiguration.Action, elapsedTime: CMTime, duration: CMTime)
```

## Parameters

`preferredPresentation`

The preferred style of media presentation shown after selecting the item.

`playbackAction`

The playback action to perform on this item, such as play, pause, or replay.

`elapsedTime`

The elapsed playback time as a CMTime value.

`duration`

The total duration of the media content as a CMTime value. Provide 0 if the duration of the content is unknown or unavailable, for example in live-streaming content.

## Discussion\note Video presentation may be unsupported for this session  (see `-[CPSessionConfiguration videoPlaybackSupported]`) or may be unavailable due to playback policy.

---

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)