我想在 iphone 应用程序中播放来自 url 的视频,但它不能在我使用以下代码的应用程序中播放
-(IBAction)play
{
NSString*videoFilepath=@"http://myserver.com.pk/Specticle_Revision_v1.mov";
NSLog(@"Filepath is: %@", videoFilepath);
NSURL *videoURL = [NSURL fileURLWithPath:videoFilepath];
MPMoviePlayerController *movie = [[MPMoviePlayerController alloc] initWithContentURL:videoURL];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:movie];
[movie play];
}