我使用 MPMoviePlayerController 作为我的媒体播放器。我正在尝试使用我的方法来寻找(movieController 是 MPMoviePlayerController 的一个实例)
-(void)seekToTime:(NSTimeInterval)time
{
[movieController setCurrentPlaybackTime:time];
[NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(printCurrentPlaybacktime) userInfo:nil repeats:YES];
}
如您所见 - 搜索后我快速打印出当前播放时间。问题是——在开始时,当前播放时间是我设置的实际新时间。一段时间后,当前播放时间是更改播放时间前的旧时间,一段时间后又回到新的实际时间。用户的结果是搜索滑块正在跳跃。
这是日志
907] 打印 [movieController currentPlaybackTime] = 3660.000000 2012-10-02 11:58:27.518 Comigo [1067:907] 打印 [movieController currentPlaybackTime] = 3660.000000 2012-10-02 11:58:27.521 Comigo [1067:907] 打印 [ movieController currentPlaybackTime] = 3660.000000 2012-10-02 11:58:27.525 Comigo[1067:907] 打印 [movieController currentPlaybackTime] = 3660.000000 2012-10-02 11:58:27.529 Comigo[1067:907] 打印 [movieController currentPlaybackTime] = 3660.000000 2012-10-02 11:58:27.531 Comigo[1067:907] 打印 [movieController currentPlaybackTime] = 3660.000000 2012-10-02 11:58:27.535 Comigo[1067:907] 打印 [movieController currentPlaybackTime] = 36620.000021 -02 11:58:27.538 Comigo[1067:907] print [movieController currentPlaybackTime] = 3660.000000} 我删除了一些行(因为它们很多)。所以不要 注意日志日期。多谢