Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>//for video.. #import &lt;MobileCoreServices/MobileCoreServices.h&gt; #import &lt;AVFoundation/AVFoundation.h&gt; #import &lt;MediaPlayer/Mediaplayer.h&gt; #import &lt;CoreMedia/CoreMedia.h&gt; UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { NSArray *mediaTypes = [NSArray arrayWithObject:(NSString*)kUTTypeMovie]; picker.mediaTypes = mediaTypes ; picker.sourceType = UIImagePickerControllerSourceTypeCamera; picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModeVideo ; [self presentModalViewController:picker animated:NO]; [picker release]; } else { UIAlertView *alt=[[UIAlertView alloc]initWithTitle:@"Error" message:@" Camera Facility is not available with this Device" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; [alt show]; [alt release]; } </code></pre> <p><strong>for saving into Document folder &amp; it also save in photo Library</strong></p> <pre><code>NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString* documentsDirectory = [paths objectAtIndex:0]; //for video NSURL *videoURL = [info objectForKey:UIImagePickerControllerMediaURL]; NSLog(@"video url-%@",videoURL); NSData *videoData = [NSData dataWithContentsOfURL:videoURL]; NSString * videoName = [NSString stringWithFormat:@"student_%d_%d.mp4",stud_id,imgVidID]; videoPath = [documentsDirectory stringByAppendingPathComponent:videoName]; NSLog(@"video path-%@",videoPath); [videoData writeToFile:videoPath atomically:YES]; NSString *sourcePath = [[info objectForKey:@"UIImagePickerControllerMediaURL"]relativePath]; UISaveVideoAtPathToSavedPhotosAlbum(sourcePath,nil,nil,nil); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload