cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject ios commit: re-enable video duration
Date Tue, 25 Jun 2013 18:17:53 GMT
Updated Branches:
  refs/heads/master 3af6ca42a -> f721482d2


re-enable video duration


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

Branch: refs/heads/master
Commit: f721482d299211a3d0da67c655a24be83b8e85ae
Parents: 3af6ca4
Author: Don Coleman <dcoleman@chariotsolutions.com>
Authored: Tue Jun 25 01:34:55 2013 -0400
Committer: Don Coleman <dcoleman@chariotsolutions.com>
Committed: Tue Jun 25 01:34:55 2013 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/CDVCapture.m | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/f721482d/CordovaLib/Classes/CDVCapture.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCapture.m b/CordovaLib/Classes/CDVCapture.m
index 6b7ed44..884702d 100644
--- a/CordovaLib/Classes/CDVCapture.m
+++ b/CordovaLib/Classes/CDVCapture.m
@@ -204,9 +204,9 @@
         options = [NSDictionary dictionary];
     }
 
-    // options could contain limit, duration and mode, only duration is supported (but is
not due to apple bug)
+    // options could contain limit, duration and mode
     // taking more than one video (limit) is only supported if provide own controls via cameraOverlayView
property
-    // NSNumber* duration = [options objectForKey:@"duration"];
+    NSNumber* duration = [options objectForKey:@"duration"];
     NSString* mediaType = nil;
 
     if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
@@ -238,12 +238,12 @@
         // iOS 3.0
         pickerController.mediaTypes = [NSArray arrayWithObjects:mediaType, nil];
 
-        /*if ([mediaType isEqualToString:(NSString*)kUTTypeMovie]){
+        if ([mediaType isEqualToString:(NSString*)kUTTypeMovie]){
             if (duration) {
                 pickerController.videoMaximumDuration = [duration doubleValue];
             }
             //NSLog(@"pickerController.videoMaximumDuration = %f", pickerController.videoMaximumDuration);
-        }*/
+        }
 
         // iOS 4.0
         if ([pickerController respondsToSelector:@selector(cameraCaptureMode)]) {


Mime
View raw message