繁体   English   中英

ionic 4 cordova-plugin-camera 默认前置摄像头不适用于 android

[英]ionic 4 cordova-plugin-camera default FRONT camera not Working on android

我正在使用这个 CameraOptions

private optionsCamera: CameraOptions = {
    quality: 50,
    saveToPhotoAlbum: false,
    correctOrientation:true,
    allowEdit: true,
    targetWidth:1024,
    targetHeight:1024,
    sourceType: this.camera.PictureSourceType.CAMERA,
    cameraDirection: this.camera.Direction.FRONT, // also i use Numbers also "1"
    destinationType: this.camera.DestinationType.DATA_URL,
    encodingType: this.camera.EncodingType.PNG,
    mediaType: this.camera.MediaType.PICTURE,    
}

但在构建后仍然 android 只打开一个后置摄像头

请帮助我寻找替代相机插件(默认前置摄像头)或修复 ionic 4 的此错误

从文件:

相机选项勘误表

安卓怪癖

任何 cameraDirection 值都会生成背面照片。 (=您只能使用后置摄像头)

https://github.com/apache/cordova-plugin-camera#android-quirks-1

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM