MPMoviePlayerController endPlaybackTime问题

时间:2011-07-16 02:44:46

标签: iphone mpmovieplayercontroller

我遇到了endPlaybackTime的问题。我试图通过30秒视频中途自动启动和停止视频

player = [[MPMoviePlayerController alloc] initWithContentURL:[self urlForVideo:video]];
player.view.frame = [self getVideoCGRect:self.interfaceOrientation];
player.view.backgroundColor = [UIColor clearColor];
player.controlStyle = MPMovieControlStyleNone;
player.shouldAutoplay = NO;
player.scalingMode = MPMovieScalingModeFill;

//-------------------------
player.currentPlaybackTime = 10.0;
player.endPlaybackTime = 18.35;
//---------------------
[self.view addSubview:player.view];

但是,这似乎并不想在正确的地方停下来。它只是播放到最后并停止。知道为什么不呢?

1 个答案:

答案 0 :(得分:0)

endPlaybackTime属性不适用于流式视频。希望你不要试图阻止流媒体视频。它的长度是30秒还是30分钟?