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

# preventsDisplaySleepDuringVideoPlayback

A Boolean value that indicates whether video playback prevents display and device sleep.

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

## Discussion

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

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 prevent display sleep for various reasons.

> Note:
> Before macOS 13, iOS 16, tvOS 16, and watchOS 9, you can only access this property from the main thread or queue.

---

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)