我在播放基于 URL 的视频时遇到问题。这是我的代码:
-(void)clickplay
{
NSURL *fileURL = [NSURL URLWithString:@"http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1211/sample_iTunes.mov"];
MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc]initWithContentURL:fileURL];
[moviePlayerController.view setFrame:CGRectMake(0, 70, 320, 270)];
[self.view addSubview:moviePlayerController.view];
moviePlayerController.fullscreen = YES;
[moviePlayerController play];
}
它编译成功,播放器确实弹出了,但它只是一直在加载……我尝试多次更改 URL,但没有效果。谁能帮我解决这个问题?