iosdevnyc
iosdevnyc

Reputation: 1871

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 ] ];          
        [moviePlayer setFullscreen:YES];
        [moviePlayer play];

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

Upvotes: 0

Views: 735

Answers (1)

jpkomick
jpkomick

Reputation: 38

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.

Upvotes: 1

Related Questions