MPMoviePlayerViewController在iOS 7上不起作用

阿尼姆

我有一个在iOS 7之前可以正常工作的代码,并且在更新电影无法播放后可以正常工作:

-(void)setMovie:(NSURL *)newMovie autoPlay:(BOOL)autoPlay
 {  
  movieView_ = [[MPMoviePlayerViewController alloc] initWithContentURL:newMovie];
  [movieView_.view setContentMode:UIViewContentModeScaleAspectFit];
  [movieView_.moviePlayer setShouldAutoplay:NO];
  movieView_.moviePlayer.view.frame=self.view.frame;
  [movieView_.moviePlayer setControlStyle:MPMovieControlStyleFullscreen];
  [movieView_.moviePlayer setMovieSourceType:MPMovieSourceTypeFile ];    
  [movieView_.moviePlayer prepareToPlay];
  id currentPhotoView = [photoViews_ objectAtIndex:currentIndex_];  
  [currentPhotoView addSubview:movieView_.moviePlayer.view];
  [movieView_.moviePlayer play];      
}

不知道是什么问题,应用程序没有崩溃。

丹尼尔·布罗德(Daniel Broad)

您实际上需要提供MPMoviePlayerViewController:

[self presentViewController: _movieView_ animated: YES completion: nil];

如果要在屏幕的一部分中播放,请使用MPMoviePlayerController。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

为什么CGContextSetRGBStrokeColor在ios7上不起作用?

来自分类Dev

UAAppReviewManager评分功能在iOS 7上不起作用

来自分类Dev

LeftBarButtonItem在iOS7上不起作用

来自分类Dev

iOS7 viewController和MPMoviePlayerViewController旋转

来自分类Dev

iOS7 viewController和MPMoviePlayerViewController旋转

来自分类Dev

FileReader在iOS 8上不起作用

来自分类Dev

SDWebImage在iOS 8上不起作用

来自分类Dev

Testflight在iOS 8上不起作用

来自分类Dev

UITableViewAutomaticDimension在iOS 8上不起作用

来自分类Dev

VideoJS:在IOS上不起作用

来自分类Dev

SDWebImage在iOS 8上不起作用

来自分类Dev

swfobject在iOS上不起作用

来自分类Dev

removeClass在iOS上不起作用

来自分类Dev

UITabBar外观setSelectionIndicatorImage在首次启动iOS7上不起作用

来自分类Dev

HTML5音频标签在iOS7设备上不起作用

来自分类Dev

iOS7:将设置保存到文件在设备上不起作用

来自分类Dev

UITabBar外观setSelectionIndicatorImage在首次启动iOS7上不起作用

来自分类Dev

为什么tintColor在iOS7的导航栏或工具栏上不起作用

来自分类Dev

Xamarin.iOS NSUrlSession在iOS 8上不起作用

来自分类Dev

Xamarin.iOS NSUrlSession在iOS 8上不起作用

来自分类Dev

iOS PushKit注册在iOS10上不起作用

来自分类Dev

Push segue在IOS 8.0上不起作用

来自分类Dev

AFNetworking 2.0.3在iOS 6上不起作用

来自分类Dev

@ Font-face在IOS上不起作用

来自分类Dev

z-index在IOS的Safari上不起作用

来自分类Dev

Bootstrap Modal在iOS设备上不起作用

来自分类Dev

UITableView中的UIPanGestureRecognizer在iOS8上不起作用

来自分类Dev

libcurl WriteMemoryCallback方法在iOS上不起作用

来自分类Dev

DojoX滑块在iOS 8 / Safari 8上不起作用

Related 相关文章

热门标签

归档