---
title: "init(id:sourceName:contentDescription:type:duration:artwork:)"
framework: nowplaying
role: symbol
role_heading: Initializer
path: "nowplaying/homemediacontent/init(id:sourcename:contentdescription:type:duration:artwork:)"
---

# init(id:sourceName:contentDescription:type:duration:artwork:)

Creates home media content.

## Declaration

```swift
init(id: String, sourceName: String, contentDescription: String?, type: MediaType, duration: MediaDuration?, artwork: Artwork?)
```

## Parameters

- `id`: A unique identifier for this content.
- `sourceName`: The display name of the device or source providing the media.
- `contentDescription`: A short description of the content, or nil when unavailable.
- `type`: The media type.
- `duration`: The total duration, or nil when live or unknown.
- `artwork`: Artwork for the content, or nil when unavailable.
