cordova-plugin-camera-preview / cordova-plugin-camera-preview

Cordova plugin that allows camera interaction from HTML code
MIT License
567 stars 559 forks source link

Cordova 10 crash #635

Open marsiliflavio opened 3 years ago

marsiliflavio commented 3 years ago

Hi, i have a problem with the plugin. I have two identical versions of the app but with different infrastructure: Cordova: 9.0.0 iOS Platform: 5.0.1 Android Platform: 8.0.0 with this no problem. CameraPreview with front camera on iOS 14.2 very well, maybe a little slow.

Cordova: 10.0.0 iOS Platform: 6.1.1 Android Platform: 9.0.0 my app crash. After starting on iOS 14.2 camerapreview with front camera, camerapreview is very slow and after 1/2 sec my app crashes

the code is the same, change the development version of Cordova, Adroid and iOS, as written above. thank you very much for your effort F.

marsiliflavio commented 3 years ago

this problem occurs by placing code inside the success event of the takeSnapshot method. The code is the same into differente version app. cameraPreviewOptions = { x: 0, y: 60, width: window.screen.width, height: window.screen.height - 200, camera: CameraPreview.CAMERA_DIRECTION.FRONT, toBack: false, tapPhoto: false, tapFocus: false, previewDrag: false, storeToFile: false, disableExifHeaderStripping: true } CameraPreview.takeSnapshot({width: 800, height: 800, quality: 10 }, function(base64PictureData) { ...my code... });