You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by do...@apache.org on 2013/06/25 20:26:46 UTC

git commit: [CB-3999] re-enable video duration

Updated Branches:
  refs/heads/master 8983aa455 -> cf675e631


[CB-3999] re-enable video duration


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/cf675e63
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/cf675e63
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/cf675e63

Branch: refs/heads/master
Commit: cf675e631a5994aba9c8a8a07868fd58d6494190
Parents: 8983aa4
Author: Don Coleman <dc...@chariotsolutions.com>
Authored: Tue Jun 25 13:16:52 2013 -0400
Committer: Don Coleman <dc...@chariotsolutions.com>
Committed: Tue Jun 25 14:25:26 2013 -0400

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/cf675e63/src/ios/CDVCapture.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m
index 54301e9..db52611 100644
--- a/src/ios/CDVCapture.m
+++ b/src/ios/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)]) {