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

Flash on off not working.

pgorasva opened this issue · comments

@pgorasva

can you please provide more info and steps to reproduce? Namely:

  • are you using the example app?
  • which version of CameraManager are you using?
  • which iPhone model and iOS version are you using?

Thanks

@torrao
No i am not using example app.
i am using 4.1 camera manager version
iPhone model : iPhone SE
iOS version: 11

@pgorasva

can you please try the example app in that same phone to see if the flash works?

@torrao

i tried example app.
but flash working only in photo capture.when i try to record video flash was not working.

I'd bet it because it changed to torch for video in a prior iOS update. I'll have a look at the code and see what I can find @torrao

@pgorasva @xC0der

I've made a PR #153 for fixing this and releasing it the next hour or so.

Basically I'm setting AVCaptureDevice.flashMode when CameraOutputMode.stillImage and AVCaptureDevice.torchMode otherwise (CameraOutputMode.videoWithMic or CameraOutputMode.videoOnly)

That should do it! Super fast turn around, nice work.

it's working.

Thanks @torrao @xC0der