---
title: "beginLoadingChildItems(at:completionHandler:)"
framework: mediaplayer
role: symbol
role_heading: Instance Method
path: "mediaplayer/mpplayablecontentdatasource/beginloadingchilditems(at:completionhandler:)"
---

# beginLoadingChildItems(at:completionHandler:)

Starts to load the children of the indicated index.

## Declaration

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

```swift
optional func beginLoadingChildItems(at indexPath: IndexPath) async throws
```

## 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:

## Discussion

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.

## See Also

### Working with child nodes

- [childItemsDisplayPlaybackProgress(at:)](mediaplayer/mpplayablecontentdatasource/childitemsdisplayplaybackprogress(at:).md)
- [numberOfChildItems(at:)](mediaplayer/mpplayablecontentdatasource/numberofchilditems(at:).md)
