4

我有以下代码用于播放影片剪辑的选定部分。电影播放还行。但是洗涤器栏没有反映正确的开始停止时间。此外,前进和后退按钮使剪辑超出指定的片段。为什么会这样,我们可以解决它吗?

TIA。

MPMoviePlayerViewController *mp =
[[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:movieFile] ];

[mp.moviePlayer setInitialPlaybackTime:21];
[mp.moviePlayer setEndPlaybackTime:48];

[self presentMoviePlayerViewControllerAnimated:mp];
[self shouldAutorotateToInterfaceOrientation:YES];
//NSLog(@"Movie Player Controller View = %@", mp.moviePlayer.view);
//NSLog(@"Movie Player Controller Parent View = %@", mp.parentViewController);

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(moviePlayBackDidFinish:)
                                             name:MPMoviePlayerPlaybackDidFinishNotification
                                           object:[mp moviePlayer]];

[mp.moviePlayer play];
4

0 回答 0