Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video capture crash, reason flashMode #66

Closed
voidw0rd opened this issue Jul 19, 2016 · 1 comment
Closed

Video capture crash, reason flashMode #66

voidw0rd opened this issue Jul 19, 2016 · 1 comment

Comments

@voidw0rd
Copy link

App crash when activating video capture mode

Device: iPad Air 2

FusumaExample[5376:2477109] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureVideoDevice setFlashMode:] - the passed flashMode 0 is not supported by the device. Use -isFlashModeSupported: to discover valid flash modes.'

clone the repository, add fusuma.hasVideo = true to ViewController.swift run the app

problem is FSVideoCameraView.swift, adding guard device.hasFlash else { return } before device.flashMode = AVCaptureFlashMode.Off fixes the crash but the flashButton is still in the UI and users can press it, that will make the app crash with the same error, in Picture mode flashButton is not displayed

@ytakzk
Copy link
Owner

ytakzk commented Jul 12, 2017

This has been fixed.

@ytakzk ytakzk closed this as completed Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants