asciinema
asciinema copied to clipboard
Breakpoints
This one adds breakpoints - locations in the recording which allow the player to auto-pause when one is encountered.
A breakpoint is new "b"
event type in asciicast stream, with optional annotation (comment) as event data.
To add a breakpoint during recording session press a hotkey (e.g. ctrl+b
).
To add breakpoints to existing recording you add "b"
events like this:
...
[1.000000, "o", "some text"]
[2.500000, "b", ""]
[3.750000, "o", "more text"]
[4.500000, "b", "chapter 5"]
...
Similarly to #340, the hotkey for adding a breakpoint is hard-coded at the moment to ctrl+b
("b" for breakpoint), but it is very likely to conflict with many interactive applications (e.g. vim), so we may want to find a better one, or go with a prefix + key (like ctrl+a <key>
combo used in GNU screen, ctrl+b <key>
in tmux).
- [x] support for breakpoints in asciicast v2 event stream
- [x] setting breakpoint during recording session via hotkey
- [ ] documentation
- [ ] find good default hotkey, and/or hotkey prefix (like GNU screen, tmux)
- [ ] implement pause-on-breakpoint mode for
asciinema play
command (opt-in with sth like-b/--breakpoints
switch) - [ ] jump to next breakpoint during
asciinema play
with hotkey (>
)
@sickill what about giving an optional name to a breakpoint : a such breakpoint can then be considered as a "chapter" (like in youtube) ?
-> we could then display chapters into individual video page
Allowing optional names for breakpoints to treat them as "chapters" or "bookmarks" sounds good :+1: That was actually what I meant by "comment" in the desc of the PR.
Bringing this PR from the dead :rocket: