CameraManager icon indicating copy to clipboard operation
CameraManager copied to clipboard

(edit) The owner of this repo is M.I.A. (/edit) Blacked out exposure after re-opening viewcontroller

Open ded opened this issue 5 years ago • 11 comments

Hi there, Using your Hello world example from the README, and [your pretty straight forward documentation], I'm experiencing an issue where the exposure / capture gets very blurry, and/or darkened after opening an instance multiple times over from a typical present() (using the iOS 13 card style - you know, the kind where you can dismiss by swiping down).

Here are my settings:

class PersonalVideoViewController: UIViewController {
  @IBOutlet weak var videoView: UIView! // from storyboard
  override func viewDidLoad() {
    cameraManager.cameraDevice = .front // this is a requirement, not going to change this.
    cameraManager.cameraOutputQuality = .high // changing this didn't make a difference
    cameraManager.flashMode = .off // changing this didn't make a difference
    cameraManager.showAccessPermissionPopupAutomatically = false
    cameraManager.exposureMode = .autoExpose // changing this didn't make a difference
    let _ = self.cameraManager.addPreviewLayerToView(self.videoView, newCameraOutputMode: .videoWithMic)
  }
}

I've created a screen recording illustrating the issue as an attempt to integrate into our application.

https://www.dropbox.com/home/Development/video?preview=Video+Jul+16%2C+8+25+35+PM.mp4

Notice it's called as a self.present(myVideoController). I attempt to adjust some exposure settings during the first pass. Then dismiss... then re-open. The problem worsens. Then I attempt to increase the exposure (because it got too dark), then everything gets too blurry. I dismiss it... re-open... and then the screen start back at a very-dark underexposed image again.

To give a concession that I'm willing to sacrifice — The complete black screen as it's booting up seems pretty normal to me (this happens on Instagram too when you open their camera — so that's ok).

Any ideas why I would be experiencing this?

ded avatar Jul 17 '20 03:07 ded

Here is how it's being presented from the base controller. As mentioned. Nothing crazy.


let storyboard = UIStoryboard(name: "Settings", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "PersonalVideoViewController") as! PersonalVideoViewController
self.present(vc, animated: true, completion: nil)

iPhone XS 13.5.1

ded avatar Jul 17 '20 03:07 ded

Circling back. Hello.

ded avatar Jul 18 '20 06:07 ded

Is this thing working?

ded avatar Jul 19 '20 21:07 ded

Would you mind at least letting people know you no longer plan on maintaining the project? It might help others to move on to alternative options.

ded avatar Jul 21 '20 03:07 ded

Anyone else here? Is this guy on vacation?

ded avatar Jul 22 '20 01:07 ded

Submitting issues here is obviously pointless and a waste of time.

ded avatar Jul 25 '20 18:07 ded

Pull requests work better.

Sent from my iPhone

On 25 Jul 2020, at 19:37, Dustin Diaz [email protected] wrote:

 Submitting issues here is obviously pointless and a waste of time.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

gamafranco avatar Jul 25 '20 19:07 gamafranco

I understand how open source works. I’ve reported a bug on a library you wrote. It’s common decency to at least reply with “I’m sorry I don’t have an answer right now” instead of waiting 10 days to leave a snarky remark to one of your supporters.

ded avatar Jul 26 '20 01:07 ded

It’s all in the tone Dustin. No answer doesn’t give you the right to start offending people.

Sent from my iPhone

On 26 Jul 2020, at 02:32, Dustin Diaz [email protected] wrote:

 I understand how open source works. I’ve reported a bug on a library you wrote. It’s common decency to at least reply with “I’m sorry I don’t have an answer right now” instead of waiting 10 days to leave a snarky remark to one of your supporters.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

gamafranco avatar Jul 26 '20 07:07 gamafranco

Would have loved if this issue was solved.

tesddev avatar Jun 29 '22 20:06 tesddev

So after not giving up on this library, I got a workaround for it. All you need do is call resumeCaptureSession() on the cameraManager in your viewWillAppear(); and stopCaptureSession() in your viewWillDisappear().


override func viewWillAppear(_ animated: Bool) {
        self.cameraManager.resumeCaptureSession()
}

and also in your viewWillDisappear


override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        cameraManager.stopCaptureSession()
}

tesddev avatar Jun 29 '22 21:06 tesddev