---
title: displayedPixelBuffer()
framework: avfoundation
role: symbol
role_heading: Instance Method
path: avfoundation/avplayerlayer/displayedpixelbuffer()
---

# displayedPixelBuffer()

Returns the pixel buffer that the player layer currently displays.

## Declaration

```swift
func displayedPixelBuffer() -> CVPixelBuffer?
```

## Return Value

Return Value The currently displayed pixel buffer, or nil if one isn’t available.

## Discussion

Discussion This method only returns an image when playback is in a paused state, and otherwise returns nil. It also returns nil when displaying protected content or if the layer isn’t currently displaying an image.

## See Also

### Processing pixel buffers

- [pixelBufferAttributes](avfoundation/avplayerlayer/pixelbufferattributes.md)
- [displayedReadOnlyPixelBuffer()](avfoundation/avplayerlayer/displayedreadonlypixelbuffer().md)
