You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/02/11 00:21:14 UTC

[06/15] git commit: reference the correct firefoxos implementation

reference the correct firefoxos implementation


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/76eb49da
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/76eb49da
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/76eb49da

Branch: refs/heads/master
Commit: 76eb49da95edd112d9eef8494615fd9d4e753e11
Parents: f9fa6cc
Author: James Long <lo...@gmail.com>
Authored: Thu Jan 9 15:59:55 2014 -0500
Committer: Herm Wong <he...@gmail.com>
Committed: Fri Jan 10 11:52:51 2014 -0800

----------------------------------------------------------------------
 plugin.xml              |  2 +-
 src/firefoxos/camera.js | 32 --------------------------------
 2 files changed, 1 insertion(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/76eb49da/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 0bc9190..0f9ad2e 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -33,7 +33,7 @@
             </feature>
         </config-file>                                         
         
-        <js-module src="src/firefoxos/camera.js" name="camera-impl">
+        <js-module src="src/firefoxos/CameraProxy.js" name="CameraProxy">
           <runs />
         </js-module>
     </platform>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/76eb49da/src/firefoxos/camera.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/camera.js b/src/firefoxos/camera.js
deleted file mode 100644
index 270f221..0000000
--- a/src/firefoxos/camera.js
+++ /dev/null
@@ -1,32 +0,0 @@
-
-var firefoxos = require('cordova/platform');
-
-function getPicture(cameraSuccess, cameraError, cameraOptions) {
-  cameraError = cameraError || function(){};
-  var pick = new MozActivity({
-    name: "pick",
-    data: {
-      type: ["image/png", "image/jpg", "image/jpeg"]
-    }
-  });
-  pick.onerror = cameraError;
-  pick.onsuccess = function() {
-    // image is returned as Blob in this.result.blob
-    // we need to call cameraSuccess with url or base64 encoded image
-    if (cameraOptions && cameraOptions.destinationType == 0) {
-      // TODO: base64
-      return;
-    }
-    if (!cameraOptions || !cameraOptions.destinationTyoe || cameraOptions.destinationType > 0) {
-      // url
-      return cameraSuccess(window.URL.createObjectURL(this.result.blob));
-    }
-  };
-}
-var Camera = {
-    takePicture: getPicture,
-    cleanup: function(){}
-};
-
-firefoxos.registerPlugin('Camera', Camera);
-