【问题标题】:MPMoviePlayer shows a solid black screenMPMoviePlayer 显示稳定的黑屏
【发布时间】:2013-01-17 12:28:02
【问题描述】:

我目前正在开发一个需要在其中播放视频的应用。一切正常。但是如果我的应用程序被发送到后台,然后又被发送到前台,它会显示一个纯黑屏幕。

请给我一个解决这个问题的方法。

    [player.view setFrame:CGRectMake(0, 0, 480, 278)];
    [player.view setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
    outputURL = [NSURL fileURLWithPath:filePath];
    [player setContentURL:outputURL];
    [player setShouldAutoplay:NO];
    player.repeatMode = MPMovieRepeatModeNone;
    player.controlStyle =  MPMovieControlStyleNone ;

    player.scalingMode = MPMovieScalingModeAspectFit;

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish) name:MPMoviePlayerPlaybackDidFinishNotification object:player];
    [player prepareToPlay];
    [player pause];
    [self.view addSubview: player.view];

【问题讨论】:

  • 粘贴你尝试过的代码
  • 张贴你的代码老兄!如果没有看到您的代码,我们就无法看到您所做的事情!
  • @NitinGohel 停止在帖子中编辑随机代码标签。

标签: iphone objective-c ios6 media-player


【解决方案1】:

看看这个解决方案 For MPMoviePlayer

【讨论】:

  • 问题依旧
猜你喜欢
  • 2011-01-11
  • 2012-01-15
  • 2020-09-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多