当我尝试navigator.camera.getPicture时,未显示本机摄像机视图。为了使它显示我必须重新打开应用程序或向上滑动(它打开控制中心和相机视图)。 我正在使用Backbone.js和Ratchet。
我的代码:
cameraClickHandler: function () {
navigator.camera.getPicture(this.cameraSuccess, this.cameraFail,
quality: 75,
correctOrientation: true,
destinationType: Camera.DestinationType.FILE_URI,
saveToPhotoAlbum: true,
sourceType : Camera.PictureSourceType.CAMERA,
encodingType: Camera.EncodingType.JPEG,
targetWidth: 600,
targetHeight: 600
}
);
}
我得到的错误:
THREAD WARNING: ['Camera'] took '613.226807' ms. Plugin should use a background thread.
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
有什么想法吗?