incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [22/45] js commit: Fixed bug in CaptureProxy.js
Date Sat, 06 Oct 2012 09:19:20 GMT
Fixed bug in CaptureProxy.js


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/62775351
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/62775351
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/62775351

Branch: refs/heads/master
Commit: 62775351a04e8b1a577d5509a60d5cbe22e608cd
Parents: 2f0df39
Author: mpberk <matthew.p.berk@intel.com>
Authored: Wed Sep 26 09:28:13 2012 -0700
Committer: mpberk <matthew.p.berk@intel.com>
Committed: Wed Sep 26 09:28:13 2012 -0700

----------------------------------------------------------------------
 lib/windows8/plugin/windows8/CaptureProxy.js |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/62775351/lib/windows8/plugin/windows8/CaptureProxy.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/CaptureProxy.js b/lib/windows8/plugin/windows8/CaptureProxy.js
index 33cfdd4..cf433e8 100644
--- a/lib/windows8/plugin/windows8/CaptureProxy.js
+++ b/lib/windows8/plugin/windows8/CaptureProxy.js
@@ -13,13 +13,16 @@ module.exports = {
     captureAudio:function(successCallback, errorCallback, args) {
         var options = args[0];
         var audioOptions = new CaptureAudioOptions();
-        if (options.duration && options.duration > 0) {
+        if (typeof(options.duration) == 'undefined') {
+            audioOptions.duration = 3600; // Arbitrary amount, need to change later
+        else if (options.duration > 0) {
             audioOptions.duration = options.duration;
-            cameraCaptureAudioDuration = audioOptions.duration;
         } else {
             errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
             return;
         }
+        cameraCaptureAudioDuration = audioOptions.duration;
+
         var mediaCaputreSettings;
         var initCaptureSettings = function () {
             mediaCaputreSettings = null;


Mime
View raw message