You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/12/23 14:59:16 UTC

[GitHub] juancrescente opened a new issue #399: Cannot fire on browser

juancrescente opened a new issue #399: Cannot fire on browser
URL: https://github.com/apache/cordova-plugin-camera/issues/399
 
 
   A very simple picture capture snippet is not working on browser (chrome Version 71.0.3578.98) or firefox. I'm using a mac.
   ```
   document.addEventListener("deviceready", onDeviceReady, false);
   
   function onDeviceReady() {
       console.log(navigator.camera);
       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);
       }
   }
   
   ```
   **Error in chrome:** 
   Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.
       at successCallback (CameraProxy.js:105)
   
   
   **Error in Firefox:**
   navigator.mozGetUserMedia ha sido reemplazado por navigator.mediaDevices.getUserMedia CameraProxy.js:112:8
   [Mostrar/ocultar detalles del mensaje.] TypeError: Argument 1 is not valid for any of the 1-argument overloads of URL.createObjectURL. CameraProxy.js:105:21
   successCallback
   http://localhost:8000/plugins/cordova-plugin-camera/src/browser/CameraProxy.js:105:21
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org