MPMoviePlayerController reverse video buffer again

I am using MPMoviePlayerController to play video from a server. It works fine, no problem. Now when I play back the buffered video and then go back, it starts to buffer again. This is a coding problem or any other. Any help or suggestion would be appreciated.

+4
source share
1 answer

Try entering the code

#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 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];
+3
source

Source: https://habr.com/ru/post/1629100/


All Articles