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
Check out this git project,
Open source library called Cocos2D extensions that includes a class you can use to play videos in Cocos2D.
https://github.com/cocos2d/cocos2d-iphone-extensions
if thats too old what about this
[CCVideoPlayer setDelegate: self]; [CCVideoPlayer playMovieWithFile: @"movie.m4v"];
or this...
http://pskfire.iteye.com/blog/1680123