---
title: "contentItem(at:)"
framework: mediaplayer
role: symbol
role_heading: Instance Method
path: "mediaplayer/mpplayablecontentdatasource/contentitem(at:)"
---

# contentItem(at:)

Retrieves the media item at the specified index.

## Declaration

```swift
func contentItem(at indexPath: IndexPath) -> MPContentItem?
```

## Parameters

- `indexPath`: The index for the media item to be retrieved.

## Return Value

Return Value The media item at the indicated index.

## See Also

### Retrieving a media item

- [contentItem(forIdentifier:completionHandler:)](mediaplayer/mpplayablecontentdatasource/contentitem(foridentifier:completionhandler:).md)
