Taking video from video camera and displaying it with MPMoviePlayerController IPhone SDK
Posted
by Daniel
on Stack Overflow
See other posts from Stack Overflow
or by Daniel
Published on 2009-08-14T03:18:08Z
Indexed on
2010/04/09
4:33 UTC
Read the original article
Hit count: 486
Has anyone tried taking a video from the camera and then using the video player provided to play it? When you take the video in portrait mode, sometimes the movie will play (when the player puts it in landscape mode) and when it puts it in portrait mode you cannot view the movie all you hear is sound,sometimes in landscape mode is flickers and does not play right, has anyone encountered this and found a way to fix it? My code to play the video looks like this:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
NSURL *urls=[info objectForKey:@"UIImagePickerControllerMediaURL"] ;
moviePlayer =
[[MPMoviePlayerController alloc] initWithContentURL:[info urls]];
if (moviePlayer)
{
[moviePlayer play];
}
}
I checked settings on the docs nothing seems like it would fix this...Thanks
© Stack Overflow or respective owner