We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我想播放的时候有播放进度条,拖动进度条改变视频播放的位置,怎么弄?多谢!
The text was updated successfully, but these errors were encountered:
CTVideoView有一个time的category
你通过- (void)setShouldObservePlayTime:(BOOL)shouldObservePlayTime withTimeGapToObserve:(CGFloat)timeGapToObserve设置shouldObservePlayTime为YES,以及监听的间隔(每隔0.5秒告知一次当前播放时间还是每隔1秒告知一次播放时间,这个间隔你可以自己定)。
- (void)setShouldObservePlayTime:(BOOL)shouldObservePlayTime withTimeGapToObserve:(CGFloat)timeGapToObserve
然后把timeDelegate赋值过去,这样你就会知道当前视频总时长、当前视频播放的时间,根据这个你就能绘制出进度条。
最后这个category下有- (void)moveToSecond:(CGFloat)second shouldPlay:(BOOL)shouldPlay方法,拖动进度条之后,把要跳转的秒数,和跳转之后是否要播放传给这个函数就可以了。
- (void)moveToSecond:(CGFloat)second shouldPlay:(BOOL)shouldPlay
Sorry, something went wrong.
No branches or pull requests
我想播放的时候有播放进度条,拖动进度条改变视频播放的位置,怎么弄?多谢!
The text was updated successfully, but these errors were encountered: