From a2fda3c7a1de1a39862dc8d5ae3fdafe4f7eba61 Mon Sep 17 00:00:00 2001 From: DMC Date: Mon, 10 Dec 2018 13:24:38 +0800 Subject: [PATCH] Update readme.md --- readme.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index a6545e9..f0b6757 100644 --- a/readme.md +++ b/readme.md @@ -34,7 +34,7 @@ html code: -index.js **simple** code: +demo.js **simple** code: ``` var resultMedias=[]; var imgs = document.getElementsByName('imgView'); @@ -67,7 +67,7 @@ function loadingUI() {} ``` ### upload and compress 上传 和 压缩 -index.js **upload** and **compress** code: +demo.js **upload** and **compress** code: ``` document.getElementById('uploadBtn').onclick = function() { //please: cordova plugin add cordova-plugin-file-transfer @@ -96,17 +96,17 @@ document.addEventListener("MediaPicker.CompressVideoEvent", function(data) { ``` ### takePhoto 拍照 -index.js **takePhoto** code: +demo.js **takePhoto** code: ``` //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 }; MediaPicker.takePhoto(function(media) { - media.index=0;//index use to imgs[data.index].src; // media.index=resultMedias.length; - resultMedias.push(media); - getThumbnail(resultMedias); - }, function(e) { console.log(e) }, cameraOptions); + media.index=0;//index use to imgs[data.index].src; // media.index=resultMedias.length; + resultMedias.push(media); + getThumbnail(resultMedias); + }, function(e) { console.log(e) }, cameraOptions); }; ```