-(void)initAndPlayMovie:(NSURL *)movieURL
{
// Initialize a movie player object with the specified URL
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
if (mp)
{
self.moviePlayer = mp;
[mp release];
[self.moviePlayer play];
}
}
这里,在上面的代码中,我们只能传递一个电影URL。 是不是可以将多个网址传递给它。在iPhone中加载多个电影MPMoviePlayerController
因此,电影播放器会在播放第一个网址后加载第二个网址。
可能吗?
我们该怎么做?
现在,当我尝试通过其他网址,完成第一个。
- (void) moviePlayBackDidFinish:(NSNotification*)notification
{
[self initAndPlayMovie:secondURL];
}
设备首先改变它的方向,同时又加载装置回来风景模式后加载&。
如何解决此问题?
在此先感谢您向我分享您的知识。
萨加尔
现在,您可以在iPhone中一起播放多个电影或视频文件,请查看此链接以获取最佳教程http://cocoabugs.blogspot.com/2010/12/playing-movies-or-videos-in-queue-using.html – 2010-12-16 09:17:56