我正在尝试从cordova-plugin-camera访问摄像机 以下是info.plist的代码和屏幕截图
<button id = "cameraTakePicture">TAKE PICTURE</button>
<img id = "myImage"></img>
<script>
document.getElementById("cameraTakePicture").addEventListener
("click", cameraTakePicture);
function cameraTakePicture() {
navigator.camera.getPicture(onSuccess, onFail, {
quality: 50,
destinationType: Camera.DestinationType.DATA_URL
});
function onSuccess(imageData) {
var image = document.getElementById('myImage');
image.src = "data:image/jpeg;base64," + imageData;
}
function onFail(message) {
alert('Failed because: ' + message);
}
}
<script>