-
Notifications
You must be signed in to change notification settings - Fork 322
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
Start the viewController with front cam #10
Comments
Hey vishal, You will not be able to call Currently, there is no way to configure SwiftyCam the way you are asking. I had not considered to add an option for the default. It is something I will add very soon in a future release. In the meantime, if you need this functionality, you can manually add the source code in the project. on line 143 of SwiftyCamViewController, change the currentCamera to front: private(set) public var currentCamera = CameraSelection.front Should do the trick in the meantime. Ill update this issue once I add the functionality. Andrew |
I have updated the project to support this functionality. You should update your project to version 2.1.0. Then in your override func viewDidLoad() {
super.viewDidLoad()
defaultCamera = .front
...
} This should do the trick. Let me know if you have any other issues Andrew |
Hey, thank you for this quick enhancement. I had done some makeshift changes to make it work with the front cam by default, but, I'm going to pull your changes from v 2.1.0 now. Have a good one. |
I don't know the reason for this but the v8 runtime blows up when layerClass is exposed to objective-c. It causes the MetadataBuilder::RegisterStaticMethods function to fail. I tested this without exposing layerClass to objective-c and everything works fine. This is key to fixing nstudio/nativescript-plugins#12
Hey,
This is a wonderful library, thank you for this.
I have problem. I want to start my camera view controller with the front camera. If I invoke
switchCamera()
inviewDidLoad
orviewWillAppear:animated
, the app crashes with the following message:[AVCaptureSession stopRunning] stopRunning may not be called between calls to beginConfiguration and commitConfiguration
I assumed that
switchCamera()
stopped the session when it was still being configured.Then , I tried to set the
currentCamera
property to.front
, but, that property's setter is private.Am I missing a way to do this?
The text was updated successfully, but these errors were encountered: