为我的教堂制作一个应用程序,需要从 xml 下载后播放 mp3 文件。NSLog 正确显示 url,但是当我运行它时,我只是得到一个旋转的“加载”和一个黑框。关于为什么的任何建议?
谢谢!
-(void)viewDidAppear:(BOOL)animated
{
RSSItem* item = (RSSItem*)self.detailItem;
self.title = item.title;
MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:item.link];
NSLog(@"The url is %@", item.link);
moviePlayerController.view.frame = CGRectMake(73, 203, 640, 360);
[self.view addSubview:moviePlayerController.view];
[moviePlayerController prepareToPlay];
moviePlayerController.fullscreen = YES;
[moviePlayerController play];