我已经阅读了几个关于直播video/audio
的帖子。不幸的是,似乎没有任何“好”的解决方案。将视频播放到UITableView中
我想为图像提供相同的功能SDWebImageView
的图像。
现在,我使用下面的代码: -
NSURL *url=[[NSURL alloc] initWithString:@"http://www.ebookfrenzy.com/ios_book/movie/movie.mov"];
MPMoviePlayerController *moviePlayer=[[MPMoviePlayerController alloc] initWithContentURL:url];
moviePlayer.controlStyle=MPMovieControlStyleDefault;
moviePlayer.shouldAutoplay=YES;
但是当我滚动tableview
,所有视频连连下载。那么如何能阻止的下载?
有没有更好的解决方案来播放视频到UITableView
?相同Facebook,Instagram和Vine Apps?
因为iOS的9起的MPMoviePlayerController和MPMoviePlayerViewController被弃用。你应该使用其他玩家控制器。 参考https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/和https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMoviePlayerViewController_class/index.html #// apple_ref/occ/cl/MPMoviePlayerViewController – Skywalker
好的。然后我将使用AVPlayerViewController。但我的问题是,我怎么能停止一再下载该视频由于实现代码如下.. –
我想这个答案将help..http://stackoverflow.com/a/14961854/5316422 – Skywalker