每一个。我试图找出如何使用MPMoviePlayerController播放直播流。为了测试我正在使用苹果测试流示例http://devimages.apple.com/iphone/samples/bipbopall.html。 它完全在UIWebView中工作,但我无法使它与MPMoviePlayerController一起工作。还有就是我的一段代码:MPMoviePlayerController和HTTP Live Streaming
NSURL *mediaURL = [NSURL URLWithString:@"http://devimages.apple.com/iphone/samples/bipbopall.html"];
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:mediaURL];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
[mp setControlStyle:MPMovieControlStyleFullscreen];
[mp setMovieSourceType:MPMovieSourceTypeStreaming];
[mp setFullscreen:YES];
[self.view addSubview:[mp view]];
[mp prepareToPlay];
[mp play];
其实控制器临危不MPMoviePlayerPlaybackDidFinishNotification玩什么。哪里有问题?
“***终止应用程序,原因是:“一个AVPlayerItem不能AVPlayer的多个实例相关联'“ – openfrog 2013-08-30 18:30:32