<!--
{
  "availability" : [
    "iOS: 7.1.0 - 14.0.0",
    "iPadOS: 7.1.0 - 14.0.0",
    "macCatalyst: 13.1.0 - 14.0.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPPlayableContentDataSource/contentItem(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(pl)MPPlayableContentDataSource(im)contentItemAtIndexPath:"
  },
  "title" : "contentItem(at:)"
}
-->

# contentItem(at:)

Retrieves the media item at the specified index.

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

## Parameters

`indexPath`

The index for the media item to be retrieved.

## Return Value

The media item at the indicated index.

## Discussion

---

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)