每一個。我試圖找出如何使用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