Giter VIP home page Giter VIP logo

Comments (5)

ku1ik avatar ku1ik commented on September 17, 2024 1

currentTime property has been now added to the DOM element: https://github.com/asciinema/asciinema-player#controlling-the-player-programmatically
It will be part of the next release.

from asciinema-player.

ku1ik avatar ku1ik commented on September 17, 2024

You could try to dispatch similar click event to the progress bar element, which calculates the seek position from event's mouse position. Not sure how hard it would be though.

There's a plan for official programmatic control API, it's most probably be based on the work in #18.

from asciinema-player.

Nateowami avatar Nateowami commented on September 17, 2024

Thanks. I thought of that and might give it a try.

Just for anyone else who tries it: It appears that it's listening for mousedown, not click. Also, I believe the element with the listener is span.bar.

Any guess as to whether this is likely to be done in the near future? If you think it will be, I'll probably just wait. Otherwise I may implement something, but it'll be very hackish. If I do I may publish it as asciinema-player-api-shim or something. But it'll be next to worthless when a better API comes out, so if you think it may happen soon, I can wait.

from asciinema-player.

ku1ik avatar ku1ik commented on September 17, 2024

I see your point. I can't really give any estimate on when it may be ready. I have a feeling this may not be sooner than in couple of months so if you need it working now then you can try "the hacky way" (I think it may not be that much of work).

I'm also happy to accept a PR with the proper controlling API (after some high level discussion of the API surface and how I see it exposed in the mentioned HTML5 element).

from asciinema-player.

Nateowami avatar Nateowami commented on September 17, 2024

OK, thanks, makes sense.
I'd love to contribute but I have zero knowledge of ClojureScript (and too busy/lazy to learn it at this time).
If I get something working I'll let you know.

from asciinema-player.

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.