2012-04-01 11 views
0

ビデオを再生すると、黒い画面が表示され、ビデオが再生されずにオーディオが再生され、近くのアプリケーションは実行できません。 は、ここに私のコードMPMoviePlayerController "ムービーをサーバーからロードする

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 


NSString *movieURL = [NSString stringWithFormat:@"http://www.aliakbar84.com/test/%d.mp4",indexPath.row]; 

MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:movieURL]]; 
[moviePlayer play]; 
MPMoviePlayerViewController *movieplayer1 = [[MPMoviePlayerViewController alloc] initWithContentURL:movieurl]; 
[self presentMoviePlayerViewControllerAnimated:movieplayer1]; 
+0

「MPMoviePlayerController」と「MPMoviePlayerViewController」の両方を正確に初期化するのはなぜですか?それはしないでください。 'MPMoviePlayerController'の初期化を解除してください! – Till

+0

thaaaanxとてもうまく動作します – Alippo

+0

未解決の質問を防ぐためにこのヒントを繰り返します。 – Till

答えて

1

正確にあなたが両方の初期化されているなぜ、MPMoviePlayerControllerMPMoviePlayerViewControllerのですか?

これは行わないでください。 MPMoviePlayerControllerの初期化を削除してください!

関連する問題