---
title: "init(preferredPresentation:playbackAction:elapsedTime:duration:)"
framework: carplay
role: symbol
role_heading: Initializer
path: "carplay/cpplaybackconfiguration/init(preferredpresentation:playbackaction:elapsedtime:duration:)"
---

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

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

## Declaration

```swift
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

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