You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2012/04/03 19:04:21 UTC
git commit: CB-426: camera.getPicture ignores mediaType in 1.5
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 <si...@gmail.com>
Authored: Tue Apr 3 13:04:11 2012 -0400
Committer: macdonst <si...@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;