我用MPMoviePlayerController来播放视频。但是没有方法/属性以2倍的速度播放视频。
还有其他方式以2倍速播放视频吗?
我用这种方法播放视频。
-(void)playMovie:(NSString *)fileName
{
NSLog(@" File name :: %@",fileName);
NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:fileName ofType:@"mp4"];
NSLog(@"\n\n moviePath :: %@",moviePath);
NSURL *url = [[NSURL fileURLWithPath:moviePath] retain];
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
moviePlayer.controlStyle = MPMovieControlStyleDefault;
moviePlayer.shouldAutoplay = YES;
moviePlayer.view.frame = [[UIScreen mainScreen] applicationFrame];
[moviePlayer.view setFrame:playVideoView.bounds];
[playVideoView addSubview:moviePlayer.view];
[moviePlayer setFullscreen:YES animated:YES];
}
答案 0 :(得分:3)
MPMoviePlayerController
符合MPMediaPlayback
protocol,其中包含以下属性:
@property(nonatomic) float currentPlaybackRate