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

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

Creates home media content with static and animated artwork.

## Declaration

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

## 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`: Static artwork for the content.
- `animatedArtwork`: Animated artwork for the content, or nil when unavailable.
