【问题标题】:MPMoviePlayerController backward buffer video againMPMoviePlayerController 再次向后缓冲视频
【发布时间】:2016-02-17 05:21:34
【问题描述】:

我正在使用 MPMoviePlayerController 从服务器播放视频。它工作正常,没问题。现在,一旦我播放缓冲视频,然后向后播放,它就会再次开始缓冲。这是编码问题还是任何其他问题。任何帮助或建议将不胜感激

【问题讨论】:

    标签: ios video mpmovieplayercontroller


    【解决方案1】:

    试试下面的代码

    #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];
    

    【讨论】:

    • nsurl 添加 viewDidload 方法
    猜你喜欢
    • 1970-01-01
    • 2012-06-10
    • 2011-01-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-06
    • 1970-01-01
    相关资源
    最近更新 更多