Note that there are some explanatory texts on larger screens.

plurals
  1. POUIImagePickerController with camera source: video trimming doesn't work
    primarykey
    data
    text
    <p>I am using <code>UIImagePickerController</code> to record a video with the <code>sourceType</code> set to <code>UIImagePickerControllerSourceTypeCamera</code>.</p> <p>I have set <code>allowsEditing</code> to true so that the video can be edited before the picker returns. But after I edit the video using the trimming interface and press "Pick", I only get back the original recording in the delegate, not the trimmed version. What am I doing wrong? I am using iPhone OS 3.1.3. I remember this used to work in an earlier version but it seems to be failing in the latest OS. Any help is appreciated?</p> <p>By the way i confirmed that if the source of the video is <code>UIImagePickerControllerSourceTypeSavedPhotosAlbum</code>, the trimming works in version 3.1.3. So trimming with source as the camera is failing. Interestingly with the camera-roll/photos-album as the source, a "Choose" button appears and soon after clicking it, the controller displays a message saying the "Video is being trimmed ... ". I don't get this message when using the camera source.</p> <p>Here is a snippet of the code I am using to record a video using the camera source.</p> <pre><code>- (void) recordVideo { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.allowsEditing = YES; picker.sourceType = UIImagePickerControllerSourceTypeCamera; picker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie]; picker.videoQuality = UIImagePickerControllerQualityTypeHigh; [self presentModalViewController:picker animated:YES]; [picker release]; } </code></pre> <p>My delegate implementation is as follows:</p> <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo: (NSDictionary *)info { [picker dismissModalViewControllerAnimated:YES]; self.videoPath = [[info objectForKey:UIImagePickerControllerMediaURL] path]; ... } </code></pre> <p>Thanks a lot,</p> <p>kris.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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