自我向5月通报以来,我可以让议员MoviePlayerViewController在iPad上演音。 录像是完美的,但没有听音。 它对我使用什么形式持怀疑态度。 它不可行。 它使用模拟器,但不在iPad。
- (IBAction)playVideo {
NSString *filepath = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"m4v"];
NSURL *fileURL = [NSURL fileURLWithPath:filepath];
moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:fileURL];
[[NSNotificationCenter defaultCenter]
addObserver:self selector:@selector(movieFinishedPlaying:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:[moviePlayer moviePlayer]];
[self presentMoviePlayerViewControllerAnimated:moviePlayer];
}
Anyone else have this problem? Or found a fix?