Video loads but doesn't play with MPMoviePlayerController in iPad

Posted by hgpc on Stack Overflow See other posts from Stack Overflow or by hgpc
Published on 2010-05-24T07:31:32Z Indexed on 2010/05/31 20:33 UTC
Read the original article Hit count: 655

I'm using MPMoviePlayerController to play videos in an iPad app. Everything works well on the iPad simulator.

On an actual device, the videos load but don't play, even if I press the play button. I can move the slider and see different frames of the video, but it never plays.

I'm using the following code:

moviePlayer = [[MPMoviePlayerController alloc] init];
moviePlayer.shouldAutoplay = YES;
moviePlayer.contentURL = video.urlVideo;
moviePlayer.view.frame = videoPlayerContainer.bounds;
moviePlayer.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[videoPlayerContainer addSubview:moviePlayer.view];
moviePlayer.controlStyle = MPMovieControlStyleEmbedded;
[moviePlayer play];

Help?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about video