preventsDisplaySleepDuringVideoPlayback
A Boolean value that indicates whether video playback prevents display and device sleep.
Declaration
nonisolated var preventsDisplaySleepDuringVideoPlayback: Bool { get set }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.