Hi I am trying to switch between the rear and front facing cameras if i start he session with the front facing camera it works but with the other way way round the AVCapturepreview layer is not visible and just presents a blank screen.
Asked
Active
Viewed 428 times
1 Answers
3
First stop the preview session. When stopped (use the delegate for this) set the camera device you want and restart the preview session. In code:
[[PBJVision sharedInstance] stopPreview];
//implement the following deluge ate
- (void)visionSessionDidStopPreview:(PBJVision *)vision{
vision.cameraDevice = PBJCameraDeviceFront;
[vision startPreview];
}

Mike242424
- 46
- 2