---
title: preventsDisplaySleepDuringVideoPlayback
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avplayer/preventsdisplaysleepduringvideoplayback
---

# preventsDisplaySleepDuringVideoPlayback

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

## Declaration

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

## Discussion

Discussion The default value is true in iOS, tvOS and Mac Catalyst apps, and false in macOS. Setting this property to 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.

## See Also

### Preventing sleep and backgrounding

- [preventsAutomaticBackgroundingDuringVideoPlayback](avfoundation/avplayer/preventsautomaticbackgroundingduringvideoplayback.md)
