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];
但是,这似乎不想在正确的位置停止。它只是播放到最后并停止。知道为什么不吗?
I am having an issue with the endPlaybackTime. I am trying to auto start and stop the video mid-way through the 30 second video
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];
But, this doesn't seem to want to stop in the correct place. It just plays to the end and stops. Any idea why not?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
endPlaybackTime 属性不可用于流视频。希望您没有试图停止播放视频。还有长度是30秒还是30分钟?
endPlaybackTime property is not available for streaming video. Hope you're not trying to stop streaming video. Also it's 30 seconds or 30 minutes in length?