0
我想在iphone應用程序從URL播放視頻,但它並沒有在應用程序中扮演我用下面的代碼如何從HTP網址在iPhone應用程序播放視頻
-(IBAction)play
{
NSString*[email protected]"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];
}
NSURL * videoURL = [NSURL URLWithString:videoFilepath]; – Mani 2012-08-07 09:37:44