---
title: preventsAutomaticBackgroundingDuringVideoPlayback
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avsamplebufferdisplaylayer/preventsautomaticbackgroundingduringvideoplayback
---

# preventsAutomaticBackgroundingDuringVideoPlayback

A Boolean value that indicates whether video playback prevents the system from automatically backgrounding an app.

## Declaration

```swift
var preventsAutomaticBackgroundingDuringVideoPlayback: Bool { get set }
```

## Discussion

Discussion The default value is true, which indicates the system doesn’t automatically background an app while playing video. The value of this property doesn’t prevent the user from backgrounding an app. note: When enqueuing sample buffers for playback at the user’s request, set the value to true, and when video playback isn’t the user’s primary focus, set it to false.

## See Also

### Preventing backgrounding

- [preventsDisplaySleepDuringVideoPlayback](avfoundation/avsamplebufferdisplaylayer/preventsdisplaysleepduringvideoplayback.md)
