I'm currently porting an iOS app to the Mac and and just have one issue concerning CCVideoPlayer.
What I want to do is to show a video using CCVideoPlayer, but I need the video to display BEHIND my other graphics on the screen. In this case, I have a TV image that will act as a frame for the video.
This is what it CURRENTLY looks like:
This is what I WANT it to look like:
I was able to achieve this for iOS by following the helpful advice in this thread:
Of course the code in CCVideoPlayerImplMac.m is completely different than CCVideoPlayerImpliOS.m, so I can't just use the same fix for the Mac.
Here's the basic code that's currently in CCVideoPlayerImplMac:
NSView *targetView = [[CCDirector sharedDirector] view];
QTMovie* movie = [[QTMovie alloc] initWithURL:theURL error:nil];
//Get Movie View
self.videoViewController = [[[NSViewController alloc] initWithNibName:kVideoTitle bundle:nil] autorelease];
[(MyMovieView*)[self.videoViewController view] setMovie:movie];
[(MyMovieView*)[self.videoViewController view] setPreservesAspectRatio:YES];
[(MyMovieView*)[self.videoViewController view] setControllerVisible:NO];
// Integrate Movie's View by Replacing the targetView from it's superview
self.retainedView = targetView;
NSView *windowContentView = [targetView superview];
[windowContentView addSubview:[self.videoViewController view]];
Any help will be greatly appreciated!