所以我使用ASIHTTPRequest從我的FTP下載視頻文件。它下載和我得到這個爲目錄文件路徑:播放下載的視頻MPMovieController
/Users/Matt_Sich/Library/Application Support/iPhone Simulator/5.0/Applications/B7366FF2-7592-4ED0-ABC2-46BA111D0FF4/Documents/INWD.mp4
好了,現在我要播放的視頻....我會形象,這樣做很容易,但由於某種原因,我不能設法讓它工作。我得到的只是一個黑色的視圖,就是這樣。
//NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Park_iPod" ofType:@"mp4"]];
NSURL *url = [NSURL URLWithString:self.PathString];
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
[self.view addSubview:moviePlayer.view];
[moviePlayer setFullscreen:YES animated:YES];
(注:self.PathString是路徑,我上面提到的下載的文件) 它起着從主束就好,所以我敢肯定,有一些錯誤的文件路徑的視頻。