<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVSampleBufferDisplayLayer/preventsDisplaySleepDuringVideoPlayback",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVSampleBufferDisplayLayer(py)preventsDisplaySleepDuringVideoPlayback"
  },
  "title" : "preventsDisplaySleepDuringVideoPlayback"
}
-->

# preventsDisplaySleepDuringVideoPlayback

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

```
var preventsDisplaySleepDuringVideoPlayback: Bool { get set }
```

## Discussion

Setting this property to <doc://com.apple.documentation/documentation/Swift/false> doesn’t force the display to sleep; it only stops preventing display sleep. Other apps or frameworks within your app may still be preventing display sleep for various reasons.

The default value is <doc://com.apple.documentation/documentation/Swift/true> in iOS, tvOS, and Mac Catalyst. The default value in macOS is <doc://com.apple.documentation/documentation/Swift/false>.

> Note:
> If you enqueue sample buffers for playback at the user’s request, you should ensure that you set the value of this property to <doc://com.apple.documentation/documentation/Swift/true>. If your app isn’t displaying video as part of the user’s primary focus, set the value of this property to <doc://com.apple.documentation/documentation/Swift/false>.

---

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)