Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone - picking a video... URL with two bars?
    primarykey
    data
    text
    <p>I have a UIPickerController to select videos in my App and it is crashing when selecting videos using the picker. When I feed the MPMoviePlayerController with the URL directly it works fine, but when the URL comes from the UIPickerController, it loads the movie correctly but crashes when the thumbnails are being created.</p> <p>I have dumped the URL to the console, just after the file is selected and this is what I see</p> <pre><code>file://localhost/private/var/mobile/Applications/FA667F85-B009-46FA-A0B9-A7345A072651/tmp//trim.Ir0gqx.MOV </code></pre> <p><strong>first question: why is the double bar before the file name? second question: why the file name comes with a trim prefix if I have editing NO on the picker?</strong></p> <p>this is the picker code:</p> <pre><code>- (void) selectMovie:(id) sender { if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypePhotoLibrary]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; NSArray *mediaTypesAllowed = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; picker.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil]; picker.delegate = self; picker.allowsEditing = NO; picker.videoQuality = UIImagePickerControllerQualityTypeHigh; // I've added this trying to make it stop compressing the video, but it won't... any clues? UIPopoverController *aPopover = [[UIPopoverController alloc] initWithContentViewController:picker]; aPopover.delegate = self; CGRect myRect = [sender frame]; [aPopover presentPopoverFromRect:myRect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionRight animated:YES]; } } - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { NSString* mediaType = [info objectForKey:UIImagePickerControllerMediaType]; if ( [ mediaType isEqualToString:@"public.movie" ]){ movieURL = [info objectForKey:UIImagePickerControllerMediaURL]; } NSLog(@"%@", movieURL); [self loadMovie:movieURL]; } </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.
 

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