我试图在NavigationController堆栈上呈现一个MoviePlayer,但它经常会在几秒钟后随机停止
@property (nonatomic, strong) MPMoviePlayerViewController *player;
实现:
MPMoviePlayerViewController *moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL: [self preSignedURL:key]];
self.player = moviePlayer;
[[self navController]presentMoviePlayerViewControllerAnimated:self.player];
尝试了几种替代方案,包括创建UIViewController并在添加到导航控制器之前在其视图上显示,但结果相同。
答案 0 :(得分:0)
因为它是流,所以您应该将源类型更改为流式传输
moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;