Giter VIP home page Giter VIP logo

Comments (1)

casatwy avatar casatwy commented on July 23, 2024

CTVideoView有一个time的category

你通过- (void)setShouldObservePlayTime:(BOOL)shouldObservePlayTime withTimeGapToObserve:(CGFloat)timeGapToObserve设置shouldObservePlayTime为YES,以及监听的间隔(每隔0.5秒告知一次当前播放时间还是每隔1秒告知一次播放时间,这个间隔你可以自己定)。

然后把timeDelegate赋值过去,这样你就会知道当前视频总时长、当前视频播放的时间,根据这个你就能绘制出进度条。

最后这个category下有- (void)moveToSecond:(CGFloat)second shouldPlay:(BOOL)shouldPlay方法,拖动进度条之后,把要跳转的秒数,和跳转之后是否要播放传给这个函数就可以了。

from ctvideoplayerview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.