So I am trying to play an intro scene in the format of a .mov file in my iOS (cocos2d) game.
This is my current code.
CGSize winSize = [[CCDirector sharedDirector] winSize];
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"DD Logo" ofType:@"mov"]];
MPMoviePlayerController * mpc;
mpc = [[MPMoviePlayerController alloc] initWithContentURL:url];
[mpc setFullscreen:YES animated:NO];
mpc.shouldAutoplay = YES;
mpc.view.backgroundColor = [UIColor whiteColor];
mpc.view.frame = CGRectMake(0.0f, 0.0f, winSize.width, winSize.height);
[mpc setScalingMode:MPMovieScalingModeFill];
[mpc setControlStyle:MPMovieControlStyleNone];
[mpc setMovieSourceType:MPMovieSourceTypeFile];
[mpc setRepeatMode:MPMovieRepeatModeNone];
[[[CCDirector sharedDirector] openGLView] addSubview:mpc.view];
[mpc play];
What happens is, the audio plays, but this is what the screen looks like. http://gyazo.com/4f046472666bf1f58c88128f24e66229
Sometimes I have issues playing .mov files. For me when I change to mp4, it works. Your code looks right so maybe changing the format would help? It is possible the codec being used in the .mov is not iOS compatible.