imaginary-cloud / CameraManager

Simple Swift class to provide all the configurations you need to create custom camera view in your app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when setup CameraManager

piv199 opened this issue · comments

"*** -[AVCaptureSession startRunning] startRunning may not be called between calls to beginConfiguration and commitConfiguration"

Example setup:

public private(set) lazy var cameraManager = with(CameraManager()) {
            $0.shouldEnableExposure = false
            $0.cameraDevice = .front
            $0.writeFilesToPhoneLibrary = false
            $0.cameraOutputMode = .videoWithMic
            $0.cameraOutputQuality = .hd1280x720
        }

And I have the same call as in example app

cameraManager.addPreviewLayerToView(cameraView, newCameraOutputMode: .videoWithMic)

Hello @piv199,

Were you able to find a solution to resolve this crash?

some issue