<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 10.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVSampleBufferDisplayLayer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVSampleBufferDisplayLayer"
  },
  "title" : "AVSampleBufferDisplayLayer"
}
-->

# AVSampleBufferDisplayLayer

An object that displays compressed or uncompressed video frames.

```
@MainActor class AVSampleBufferDisplayLayer
```

## Topics

### Accessing the video renderer

[`sampleBufferRenderer`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/sampleBufferRenderer)

An object that enqueues video sample buffers for rendering.

### Configuring the layer

[`isReadyForDisplay`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/isReadyForDisplay)

A Boolean value that indicates whether the first video frame is ready for display.

[`controlTimebase`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/controlTimebase)

A timebase that determines how the layer interprets timestamps.

[`videoGravity`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/videoGravity)

A value that indicates how the layer displays video within its bounds.

[`AVLayerVideoGravity`](/documentation/AVFoundation/AVLayerVideoGravity)

A structure that defines how a layer displays a player’s visual content within the layer’s bounds.

### Protecting content

[`preventsCapture`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/preventsCapture)

A Boolean value that indicates whether the layer protects against screen capture.

[`isOutputObscuredDueToInsufficientExternalProtection`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/isOutputObscuredDueToInsufficientExternalProtection)

A Boolean value that indicates whether the system obscures decoded output due to insufficient external protection on the current device.

### Preventing backgrounding

[`preventsDisplaySleepDuringVideoPlayback`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/preventsDisplaySleepDuringVideoPlayback)

A Boolean value that indicates whether the layer prevents the system from sleeping during video playback.

[`preventsAutomaticBackgroundingDuringVideoPlayback`](/documentation/AVFoundation/AVSampleBufferDisplayLayer/preventsAutomaticBackgroundingDuringVideoPlayback)

A Boolean value that indicates whether video playback prevents the system from automatically backgrounding an app.

### Handling errors

  <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/AVSampleBufferDisplayLayerFailedToDecode>

[`AVSampleBufferDisplayLayerFailedToDecodeNotification`](/documentation/AVFoundation/AVSampleBufferDisplayLayerFailedToDecodeNotification)

A notification the system posts when a sample buffer display layer fails to decode.

[`AVSampleBufferDisplayLayerFailedToDecodeNotificationErrorKey`](/documentation/AVFoundation/AVSampleBufferDisplayLayerFailedToDecodeNotificationErrorKey)

The key for the corresponding error.

### Deprecated

[Deprecated symbols](/documentation/AVFoundation/avsamplebufferdisplaylayer-deprecated-symbols)

Review unsupported symbols and their replacements.



---

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)