ios – MPMoviePlayerController再次向后缓冲视频

我正在使用MPMoviePlayerController来播放来自server.it的视频工作正常,没问题.现在我播放缓冲视频然后再往后开始再次缓冲.这是一个编码问题或任何其他.任何帮助或建议将不胜感激 最佳答案 试试下面的代码

#import <MediaPlayer/MediaPlayer.h>
@property (strong, nonatomic) MPMoviePlayerController *streamPlayer;

 NSURL *streamURL = [NSURL URLWithString:@"http://clips.vorwaerts-gmbh.de/VfE_html5.mp4"];

    _streamPlayer = [[MPMoviePlayerController alloc] initWithContentURL:streamURL];

    // depending on your implementation your view may not have it's bounds set here
    // in that case consider calling the following 4 msgs later
    //http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8
    [self.streamPlayer.view setFrame: self.view.bounds];

    self.streamPlayer.controlStyle = MPMovieControlStyleDefault;

    [self.view addSubview: self.streamPlayer.view];

    [self.streamPlayer play];
点赞