Issue
i always get following error when i'm trying to start the ionic camera-preview:
ERROR Error: Uncaught (in promise): No preview
I updated all dependencies, added the provider etc. but i don't get it running, hope anyone can help me =)
The CameraPreviewOptions are copied from the example in the docs.
this.cameraPreview.startCamera(this.cameraPreviewOpts).then(
(res) => {
console.log(res)
},
(err) => {
console.log(err)
});
Solution
I had the same issue like you,
The following instructions did the trick for me:
start and then show the camera-preview in the ionViewCanEnter()
lifecycle function.
You have also to be carefull of hiding the camera-preview in the ionViewWillLeave()
lifecycle function. And also showing it again in the ionViewWillEnter()
lifecycle function. To be clean.
Hope it helps :)
Answered By - Nicolas
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.