tmux2html icon indicating copy to clipboard operation
tmux2html copied to clipboard

Question/Feature Request: control

Open faxm0dem opened this issue 9 years ago • 4 comments

Is there any way I could control the playback? The best would be to be able (like ttyplay) to pause/resume/change_playback_speed with the press of a key, but I understand this would involve writing a js handler.

What I need right now would be a way to defer the playback (I'm embedding tmux2html into a reveal.js presentation)

Cheers

faxm0dem avatar Apr 15 '16 08:04 faxm0dem

This is something I want to add formally. There is a very rudimentary JS interface for it right now, though: tmux.stop(), tmux.resume(), and tmux.next()

tweekmonster avatar Apr 15 '16 15:04 tweekmonster

I added tmux.setSpeedMultiplier(). You can view the commit for details.

What I need right now would be a way to defer the playback (I'm embedding tmux2html into a reveal.js presentation)

I'm not sure if reveal.js allows you to include your own javascript, but you should be able to call out to the tmux functions within an iframe. If you want to ensure that the animation starts paused, you can do this after the HTML is written:

echo '<script>tmux.stop();</script>' >> /tmp/realtime.html

I'm leaving this issue open since I want to add keyboard shortcuts later in the near future.

tweekmonster avatar Apr 15 '16 17:04 tweekmonster

just tried tmux.stop() and tmux.resume() they work like a charm thanks!

faxm0dem avatar Apr 13 '17 19:04 faxm0dem

*checks today's date*

tweekmonster avatar Apr 14 '17 16:04 tweekmonster