-1

我使用 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];

}
4

1 回答 1

3

MPMoviePlayerController符合MPMediaPlayback 协议,它具有以下属性:

@property(nonatomic) float currentPlaybackRate
于 2013-01-07T05:40:05.883 回答