私は基本的な.movビデオファイルを以下のコードを使用して再生しようとしていますが、私が割り当てたボタンが押されると、表示される唯一のものは黒いフレームですが、ビデオは再生されません。どんな助けもありがとうございます。ありがとう。私のMPMoviePlayerControllerはなぜ再生されませんか?
@implementation SRViewController
-(IBAction)playMovie{
NSString *url = [[NSBundle mainBundle]
pathForResource:@"OntheTitle" ofType:@"mov"];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc]
initWithContentURL: [NSURL fileURLWithPath:url]];
// Play Partial Screen
player.view.frame = CGRectMake(10, 10, 720, 480);
[self.view addSubview:player.view];
// Play Movie
[player play];
}
@end
それは空白の黒い画面を表示していますか? –