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

Configure preset before addInput #144

Merged
merged 1 commit into from
Apr 21, 2016
Merged

Configure preset before addInput #144

merged 1 commit into from
Apr 21, 2016

Conversation

onmyway133
Copy link
Contributor

I have this error in iPhone 5

Can't add <AVCaptureDeviceInput: 0x1724d560 [Front Camera]> because the device does not support AVCaptureSessionPreset1920x1080. Use -[AVCaptureDevice supportsAVCaptureSessionPreset:].

As you already know, the AVCaptureSession sessionPreset defaults to AVCaptureSessionPresetHigh. In iPhone 5, AVCaptureSessionPresetHigh means 1920x1080 for Back Camera and 1280x720 for Front Camera.

This maybe because when changing from Back to Front camera, AVCaptureSessionPresetHigh still means 1920x1080 for the Front Camera 🐼 !!! Maybe 😬

So this fix always check and update sessionPreset

@zenangst zenangst merged commit 0b80bdd into master Apr 21, 2016
@zenangst zenangst deleted the fix/preset branch April 21, 2016 08:23
@onmyway133
Copy link
Contributor Author

Actually, don't know how to reproduce this case

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

Successfully merging this pull request may close these issues.

3 participants