iOSシミュレーターでプリロードファイルを表示できるアプリを作っています。シミュレーターに表示画面は表示されますが、映像も音も聞こえません。
これが私のコードです。
#import "BIDViewController.h"
@implementation BIDViewController
@synthesize moviePlayer;
-(IBAction)playMovie:(id)sender
{
NSString *url = [[NSBundle mainBundle]
pathForResource:@"SwimGood" ofType:@"m4v"];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc]
initWithContentURL:[NSURL fileURLWithPath:url]];
//Play partial screen.
player.view.frame = CGRectMake(64, 100, 200, 150);
[self.view addSubview: player.view];
[self.moviePlayer prepareToPlay];
[player play];
}