Enumeration Case

AVCaptureSession.InterruptionReason.videoDeviceNotAvailableInBackground

An interruption caused by the app being sent to the background while using a camera.

Declaration

case videoDeviceNotAvailableInBackground = 1

Discussion

Camera usage is prohibited while in the background. If you attempt to start running a camera while in the background, the capture session sends an AVCaptureSessionWasInterrupted with this interruption reason. If you don't explicitly call the stopRunning() method, your startRunning() request is preserved, and when your app comes back to foreground, you receive AVCaptureSessionInterruptionEnded and your session starts running.