Note that there are some explanatory texts on larger screens.

plurals
  1. POGot the message "WARNING: under normal conditions, _fillInQueueWithExtraSpace:.." and MPMoviePlayer rotation not work in iPad IOS 5.1
    primarykey
    data
    text
    <p>It's my first post, and may be it may seem incorrect. So, I've to make rotation in cocos2d on iPad (5.1) I use 2 different videos to each orientation. And there I have 2 problems:</p> <ol> <li><p>The app starts in portrait mode, and plays video normally. I call (play) the video 5-10 times, when video finishs I rotate simulator. The view rotates, BUT when I call (play) video - it shows white screen and the next message:</p> <blockquote> <p>"WARNING: under normal conditions, _fillInQueueWithExtraSpace:ignoreExistingItems: should not be re-entered."</p> </blockquote> <p>Then If I rotate screen again (several times) - and play it in landscape mode - it plays video well. <strong>Also vice versa. When I start from landscape mode</strong></p></li> <li><p>The View rotating problem. When I rotate view to the left/right landscape (from portrait) - can't rotate view backward. So I can rotate only in clockwise or counter clockwise. How to fix it?</p></li> </ol> <hr> <pre><code>-(id) init { pathToVideoP = [[NSBundle mainBundle] pathForResource:@"video_portrait" ofType:@"mp4"]; pathToVideoL = [[NSBundle mainBundle] pathForResource:@"video_landscape" ofType:@"mp4"]; theMovieP = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:pathToVideoP]]; theMovieL = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:pathToVideoL]]; } -(void) playVideoButtonClicked { movieButton.visible = FALSE; if (sharedManager.isPortrait){ theMovie = theMovieP; } else { theMovie = theMovieL; } [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:[theMovie moviePlayer]]; CGSize size = [[CCDirector sharedDirector] winSize]; [[[CCDirector sharedDirector] openGLView] addSubview:theMovie.view]; player = [self.theMovie moviePlayer]; player.controlStyle = MPMovieControlStyleNone; [theMovie moviePlayer].view.backgroundColor = [UIColor whiteColor]; theMovie.view.frame = CGRectMake(0, 0, size.width, size.height); if (sharedManager.isPortrait) { CGAffineTransform transform = player.view.transform; player.view.transform = transform; } else if (sharedManager.changeOrientation) { CGAffineTransform transform = player.view.transform; transform = CGAffineTransformRotate(transform, (-M_PI/2 )); player.view.transform = transform; } sharedManager.changeOrientation = NO; player.backgroundView.backgroundColor = [UIColor whiteColor]; theMovie.view.backgroundColor = [UIColor whiteColor]; player.view.userInteractionEnabled = NO; player.scalingMode = MPMovieScalingModeNone; [player play]; } -(void) moviePreloadDidFinish:(id)sender { } -(void) movieFinishedCallback:(NSNotification*) aNotification { theMovie = [aNotification object]; [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:theMovie]; [player stop]; [theMovie.view removeFromSuperview]; movieButton.visible = TRUE; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload