preventsDisplaySleepDuringVideoPlayback
A Boolean value that indicates whether the layer prevents the system from sleeping during video playback.
Declaration
var preventsDisplaySleepDuringVideoPlayback: Bool { get set }Discussion
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 be preventing display sleep for various reasons.
The default value is true in iOS, tvOS, and Mac Catalyst. The default value in macOS is false.