Update readme.md

This commit is contained in:
DMC
2018-12-10 13:41:22 +08:00
committed by GitHub
parent a2fda3c7a1
commit 84a66f8c02
+3 -2
View File
@@ -97,11 +97,12 @@ document.addEventListener("MediaPicker.CompressVideoEvent", function(data) {
### takePhoto 拍照
demo.js **takePhoto** code:
cameraOptions docs: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html#camera
```
//please add : cordova plugin add cordova-plugin-camera
document.getElementById('takePhotoBtn').onclick = function() {
//cameraOptions docs https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html#camera
var cameraOptions={ quality: 25,mediaType: Camera.MediaType.PICTURE };
var cameraOptions={ quality: 25,mediaType: Camera.MediaType.PICTURE };//see cordova camera docs
MediaPicker.takePhoto(function(media) {
media.index=0;//index use to imgs[data.index].src; // media.index=resultMedias.length;
resultMedias.push(media);