incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject git commit: CB-426: camera.getPicture ignores mediaType in 1.5
Date Tue, 03 Apr 2012 17:04:21 GMT
Updated Branches:
  refs/heads/master f75b5f972 -> c31219a88


CB-426: camera.getPicture ignores mediaType in 1.5


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/c31219a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/c31219a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/c31219a8

Branch: refs/heads/master
Commit: c31219a8890e24b8cf59b7d2c13fb675ceef605b
Parents: f75b5f9
Author: macdonst <simon.macdonald@gmail.com>
Authored: Tue Apr 3 13:04:11 2012 -0400
Committer: macdonst <simon.macdonald@gmail.com>
Committed: Tue Apr 3 13:04:11 2012 -0400

----------------------------------------------------------------------
 lib/common/plugin/Camera.js |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/c31219a8/lib/common/plugin/Camera.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/Camera.js b/lib/common/plugin/Camera.js
index 5e58af8..db6c224 100644
--- a/lib/common/plugin/Camera.js
+++ b/lib/common/plugin/Camera.js
@@ -75,10 +75,14 @@ cameraExport.getPicture = function(successCallback, errorCallback, options)
{
     if (typeof options.encodingType == "number") {
         encodingType = options.encodingType;
     }
-    // TODO: parse MediaType
+    
+    var mediaType = Camera.MediaType.PICTURE;
+    if (typeof options.mediaType == "number") {
+        mediaType = options.mediaType;
+    }
     // TODO: enable allow edit?
 
-    exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType,
sourceType, targetWidth, targetHeight, encodingType]);
+    exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType,
sourceType, targetWidth, targetHeight, encodingType, mediaType]);
 }
 
 module.exports = cameraExport;


Mime
View raw message