ccvideoplayer

Cocos2d: How to play a video in the background of a CCLayer

佐手、 提交于 2019-12-06 06:31:33
问题 I want the video play in the background, and the text label in the front, run the following code, video is playing, but text label does not show! -(id) init { if(!(self=[super init])) { return nil; } CGSize size = [[CCDirector sharedDirector] winSize]; // MP4 NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"test" ofType:@"m4v"]]; moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; [moviePlayer respondsToSelector:@selector(setFullscreen:animated:

Cocos2d: How to play a video in the background of a CCLayer

二次信任 提交于 2019-12-04 13:08:22
I want the video play in the background, and the text label in the front, run the following code, video is playing, but text label does not show! -(id) init { if(!(self=[super init])) { return nil; } CGSize size = [[CCDirector sharedDirector] winSize]; // MP4 NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"test" ofType:@"m4v"]]; moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; [moviePlayer respondsToSelector:@selector(setFullscreen:animated:)]; moviePlayer.controlStyle = MPMovieControlStyleNone; moviePlayer.shouldAutoplay = YES; moviePlayer