• <tfoot id='ZYFqv'></tfoot>

      <bdo id='ZYFqv'></bdo><ul id='ZYFqv'></ul>
    1. <i id='ZYFqv'><tr id='ZYFqv'><dt id='ZYFqv'><q id='ZYFqv'><span id='ZYFqv'><b id='ZYFqv'><form id='ZYFqv'><ins id='ZYFqv'></ins><ul id='ZYFqv'></ul><sub id='ZYFqv'></sub></form><legend id='ZYFqv'></legend><bdo id='ZYFqv'><pre id='ZYFqv'><center id='ZYFqv'></center></pre></bdo></b><th id='ZYFqv'></th></span></q></dt></tr></i><div id='ZYFqv'><tfoot id='ZYFqv'></tfoot><dl id='ZYFqv'><fieldset id='ZYFqv'></fieldset></dl></div>

        <legend id='ZYFqv'><style id='ZYFqv'><dir id='ZYFqv'><q id='ZYFqv'></q></dir></style></legend>

        <small id='ZYFqv'></small><noframes id='ZYFqv'>

      1. 收到消息“警告:在正常情况下,_fillInQueueWithExtraSpace:.."和 MPMovieP

        时间:2024-08-12
            <bdo id='ttGEo'></bdo><ul id='ttGEo'></ul>
              <tbody id='ttGEo'></tbody>

          • <legend id='ttGEo'><style id='ttGEo'><dir id='ttGEo'><q id='ttGEo'></q></dir></style></legend>

            <small id='ttGEo'></small><noframes id='ttGEo'>

              1. <i id='ttGEo'><tr id='ttGEo'><dt id='ttGEo'><q id='ttGEo'><span id='ttGEo'><b id='ttGEo'><form id='ttGEo'><ins id='ttGEo'></ins><ul id='ttGEo'></ul><sub id='ttGEo'></sub></form><legend id='ttGEo'></legend><bdo id='ttGEo'><pre id='ttGEo'><center id='ttGEo'></center></pre></bdo></b><th id='ttGEo'></th></span></q></dt></tr></i><div id='ttGEo'><tfoot id='ttGEo'></tfoot><dl id='ttGEo'><fieldset id='ttGEo'></fieldset></dl></div>
                • <tfoot id='ttGEo'></tfoot>

                  本文介绍了收到消息“警告:在正常情况下,_fillInQueueWithExtraSpace:.."和 MPMoviePlayer 旋转在 iPad IOS 5.1 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这是我的第一篇文章,可能看起来不正确.所以,我必须在 iPad (5.1) 上的 cocos2d 中进行旋转我对每个方向使用 2 个不同的视频.我有两个问题:

                  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:

                  1. 应用程序以纵向模式启动,并正常播放视频.我调用(播放)视频 5-10 次,当视频完成时,我旋转模拟器.视图旋转,但是当我调用(播放)视频时 - 它显示白屏和下一条消息:

                  1. 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:

                  警告:在正常情况下,_fillInQueueWithExtraSpace:ignoreExistingItems: 不应重新输入."

                  "WARNING: under normal conditions, _fillInQueueWithExtraSpace:ignoreExistingItems: should not be re-entered."

                  然后,如果我再次(多次)旋转屏幕 - 并以横向模式播放 - 它可以很好地播放视频.反之亦然.当我从横向模式开始时

                  Then If I rotate screen again (several times) - and play it in landscape mode - it plays video well. Also vice versa. When I start from landscape mode

                  视图旋转问题.当我将视图旋转到左/右横向(从纵向)时 - 无法向后旋转视图.所以我只能顺时针或逆时针旋转.如何解决?

                  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?

                  <小时>

                  -(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;
                  }
                  

                  推荐答案

                  在创建播放器对象后添加这行代码.player = [self.theMovie 电影播放器];player.controlStyle = MPMovieControlStyleNone;

                  Add this line of code After creating Player Object. player = [self.theMovie moviePlayer]; player.controlStyle = MPMovieControlStyleNone;

                  在 iOS 6.0 以下版本是必需的.可能会有所帮助.

                  It's necessary in below version of iOS 6.0. May be it's helpful.

                  [播放器准备播放];

                  这篇关于收到消息“警告:在正常情况下,_fillInQueueWithExtraSpace:.."和 MPMoviePlayer 旋转在 iPad IOS 5.1 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在使用 cocos2d 的 iphone 应用程序中使用 MYSQL 数据库连接? 下一篇:Cocos2d-iphone 支持 iPhone 4 高分辨率

                  相关文章

                  <tfoot id='cz7yT'></tfoot>

                        <bdo id='cz7yT'></bdo><ul id='cz7yT'></ul>

                      <legend id='cz7yT'><style id='cz7yT'><dir id='cz7yT'><q id='cz7yT'></q></dir></style></legend>
                    1. <small id='cz7yT'></small><noframes id='cz7yT'>

                      <i id='cz7yT'><tr id='cz7yT'><dt id='cz7yT'><q id='cz7yT'><span id='cz7yT'><b id='cz7yT'><form id='cz7yT'><ins id='cz7yT'></ins><ul id='cz7yT'></ul><sub id='cz7yT'></sub></form><legend id='cz7yT'></legend><bdo id='cz7yT'><pre id='cz7yT'><center id='cz7yT'></center></pre></bdo></b><th id='cz7yT'></th></span></q></dt></tr></i><div id='cz7yT'><tfoot id='cz7yT'></tfoot><dl id='cz7yT'><fieldset id='cz7yT'></fieldset></dl></div>