---
title: "requestPlayerItem(forVideo:options:resultHandler:)"
framework: photos
role: symbol
role_heading: Instance Method
path: "photos/phimagemanager/requestplayeritem(forvideo:options:resulthandler:)"
---

# requestPlayerItem(forVideo:options:resultHandler:)

Requests a representation of the video asset for playback, to be loaded asynchronously.

## Declaration

```swift
func requestPlayerItem(forVideo asset: PHAsset, options: PHVideoRequestOptions?, resultHandler: @escaping (AVPlayerItem?, [AnyHashable : Any]?) -> Void) -> PHImageRequestID
```

## Parameters

- `asset`: The video asset to be played back.
- `options`: Options specifying how Photos should handle the request and notify your app of progress or errors. For details, see doc://com.apple.photokit/documentation/Photos/PHVideoRequestOptions.
- `resultHandler`: A block Photos calls after loading the asset’s data and preparing the player item. The block takes the following parameters:

## Return Value

Return Value A numeric identifier for the request. If you need to cancel the request before it completes, pass this identifier to the cancelImageRequest(_:) method.

## Discussion

Discussion When you call this method, Photos downloads the video data (if necessary) and creates a player item. It then calls your resultHandler block to provide the requested video. Use this method when you want to simply play back the video asset as it currently exists. For more detailed options or to work with the asset’s audio and video tracks, use the requestAVAsset(forVideo:options:resultHandler:) method instead.

## See Also

### Requesting Video Objects

- [requestExportSession(forVideo:options:exportPreset:resultHandler:)](photos/phimagemanager/requestexportsession(forvideo:options:exportpreset:resulthandler:).md)
- [requestAVAsset(forVideo:options:resultHandler:)](photos/phimagemanager/requestavasset(forvideo:options:resulthandler:).md)
