Note that there are some explanatory texts on larger screens.

plurals
  1. POMOV playback not working using UIImagePickerController with MPMoviePlayerController
    primarykey
    data
    text
    <p>I have read similar threads regarding movie playback in a MPMoviePlayerController after selecting a video using UIImagePickerController including:</p> <p><a href="https://stackoverflow.com/questions/6455299/mpmovieplayercontroller-do-not-play-movie-picked-from-uiimagepickercontroller">MPMoviePlayerController do not play movie picked from UIImagePickerController</a></p> <ul> <li>Releasing the picker and/or the moviePlayer on playback complete or a combination of the two does not resolve my issue.</li> </ul> <p><a href="https://stackoverflow.com/questions/7493860/problem-playing-mov-file-in-mpmovieplayercontroller">Problem playing mov file in MPMoviePlayerController</a></p> <ul> <li>My movie is recorded via the iPhone real-time and will not have any codec issues - its a standard MOV</li> </ul> <p>My code is below - and believe me, I have tried every permutation I can fathom with this code. I have also tried to use MPMoviePlayerViewController, presenting it modally using the UIViewController MediaPlayer Additions - presentMoviePlayerViewControllerAnimated</p> <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [self.navigationController dismissModalViewControllerAnimated:YES]; if ( currentMediaType == kMediaTypeVideo ) { MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[info objectForKey:@"UIImagePickerControllerMediaURL"]]; moviePlayer.controlStyle = MPMovieControlStyleEmbedded; [moviePlayer.view setFrame:current_player_view.bounds]; [current_player_view addSubview:moviePlayer.view]; } } </code></pre> <p>I have also tried adjusting how I provide the movie path to the MPMoviePlayerController - I recognize I can access the path like so:</p> <pre><code>[[info objectForKey:@"UIImagePickerControllerMediaURL"] path]; </code></pre> <p>...and therefore can provide the NSURL with this code instead:</p> <pre><code>NSString *chosenMoviePath = [[info objectForKey:@"UIImagePickerControllerMediaURL"] path]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:chosenMoviePath]]; </code></pre> <p>However this does not resolve the issue either. There really shouldn't be any crazy extreme trick to recording a video and immediately playing said video in the movie player. Seriously. Its all on the device. Any help is <em>extremely</em> appreciated. I've spent much to much time on this already.</p> <p>Thanks in advance!</p> <p>J</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.
 

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