Cordova Camera Plugin returns green pictures Windows Phone 8.1

早过忘川 提交于 2019-12-04 16:16:44

You may try this:

camera: {
    pictureSource: "UNDEFINED",
    destinationType: "UNDEFINED",
    cameraInitialize: function () {
        pictureSource = navigator.camera.PictureSourceType;
        destinationType = navigator.camera.DestinationType;
        cameraOptions = { quality: 50, allowEdit: true, destinationType: destinationType.DATA_URL, correctOrientation: true }
        galleryOptions = { quality: 50, destinationType: destinationType.DATA_URL, sourceType: pictureSource.PHOTOLIBRARY }
    },
    getPicture: function (cameraSuccess, cameraError, cameraOptions) {
        navigator.camera.getPicture(cameraSuccess, cameraError, cameraOptions);
    }
},

For me the only solution so far (per microsoft support) is to hard reset your phone. I have an ancient Lumia running windows phone 8.1 and it is having the same issue in my app.

I actually think that the device is overheating.

Also things you should do to help avoid camera issues in your WP app:

  • Assuming you use cordova, check if the video object has the maximum z-index and check if it isn't stacking under your application.
  • If you also use angular, some button types fire ng-click twice on IE and so the camera opens twice.
  • Implement cordova-camera-plugin 2.0.0 which fixes things like double-tapping in the camera and making it crash

I hope this helps you in your painful quest.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!