Comments (5)
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.
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.
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.
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.
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)
- Tmux pane disappears when opening nvim in its neighboring pane HOT 4
- Working example of getting source from element? HOT 5
- Player does not show in dropdown in Firefox HOT 7
- TypeError: Cannot read properties of null (reading 'firstChild')
- view operation records in real-time
- Wrapping failure under special conditions
- UI will not show up when pressing hotkeys HOT 3
- why does it not render sixel? HOT 1
- v3 player is harder to style than v2 HOT 8
- UI width not correctly computed HOT 3
- Cannot read properties of null (reading 'init') HOT 1
- theme settings seems to be ignored HOT 4
- sixel support
- Artifacting on asciinema.org - looks good in CLI player HOT 2
- Feature: Text to speech HOT 4
- FYI, hit unreachable!() in webassembly player HOT 3
- Player width sizing incorrect on Safari/WebKit browsers HOT 7
- Failed to import `asciinema-player` (missing `"type": "module"`?) HOT 1
- Export asciinema-player.min.js
- markers do not support the idleTimeLimit setting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciinema-player.