<!--
{
  "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/beginLoadingChildItems(at:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(pl)MPPlayableContentDataSource(im)beginLoadingChildItemsAtIndexPath:completionHandler:"
  },
  "title" : "beginLoadingChildItems(at:completionHandler:)"
}
-->

# beginLoadingChildItems(at:completionHandler:)

Starts to load the children of the indicated index.

```
optional func beginLoadingChildItems(at indexPath: IndexPath, completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

## Parameters

`indexPath`

The index of the current item.

`completionHandler`

A block to be called after all loading is completed.

    The block receives the following parameter:

- *error*: Contains an error message if there was an error trying to load the children of the indicated item; otherwise, contains `nil`.

## Discussion

Call this method to start asynchronous batch loading of media items. The app can load content before the media player needs to display the next media items. When you use this method, the client app must call the completion handler after loading has finished.

---

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)