我通过ipad中的mpmovieplayercontroller播放m3u8 url(即来自Wowza Streaming Engine)。但最初我可以观察播放视频的延迟。请帮助我如何减少播放视频的延迟时间。
这是我的代码:
urlStr=@"http://192.168.1.14:1935/live/teststream/playlist.m3u8";
NSURL *url = [NSURL URLWithString:urlStr];
videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
[videoPlayer prepareToPlay];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doneButtonClicked:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MPMoviePlayerDidExitFullscreen:) name:MPMoviePlayerDidExitFullscreenNotification object:nil];
videoPlayer.movieSourceType = MPMovieSourceTypeStreaming;
[videoPlayer setShouldAutoplay:YES];
videoPlayer.controlStyle=MPMovieScalingModeAspectFit;
//[videoPlayer prepareToPlay];
[_session.previewView addSubview:videoPlayer.view];
[_session.previewView bringSubviewToFront:videoPlayer.view];
videoPlayer.view.frame = CGRectMake(0, 0,768, 512);
[videoPlayer play];
请帮我解决此问题。