开发者

MPMoviePlayer not playing on iPhone 4 or iOS 4.0

I am having trouble with MPMoviePLAYER not showing video just audio. It doesn't work on iOS 4.0.

Can anyone help please?

MPMoviePlayerController *moviePlayer;
        NSBundle *bundle = [NSBundle mainBundle];
        NSString *moviePath = [bundle pathForResource:@"Video" ofType:@"mp4"];

        moviePlayer = [ [ MPMoviePlayerController alloc ]
                       initWithContentURL: [ NSURL fileURLWithPath: moviePath ] ];          
        [mo开发者_JS百科viePlayer setFullscreen:YES];
        [moviePlayer play];

I am also getting the following message in the console "AddRunningClient starting device on non-zero client count"


I am having this issue too. At first I was only noticing it when I set the active configuration to 'Distribution'. However, I've started getting the message when the configuration is set to 'Debug'. Only audio plays and the MPMoviePlayerController never appears on screen.

Someone was nice enough to do a post about this issue and ways to resolve it. Seems a lot has changed with the updated SDK.

http://iosdevelopertips.com/video/getting-mpmovieplayercontroller-to-cooperate-with-ios4-3-2-ipad-and-earlier-versions-of-iphone-sdk.html

I've just started going through it, hope you find it useful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜