Document "b" (breakpoint) event type

This commit is contained in:
Marcin Kulik
2019-03-17 14:33:36 +01:00
parent 08e40ba5ba
commit f25f9d6e8b

View File

@@ -13,7 +13,8 @@ Example file:
{"version": 2, "width": 80, "height": 24, "timestamp": 1504467315, "title": "Demo", "env": {"TERM": "xterm-256color", "SHELL": "/bin/zsh"}}
[0.248848, "o", "\u001b[1;31mHello \u001b[32mWorld!\u001b[0m\n"]
[1.001376, "o", "That was ok\rThis is better."]
[2.143733, "o", " "]
[1.500000, "b", ""]
[2.143733, "o", "Now... "]
[6.541828, "o", "Bye!"]
```
@@ -114,7 +115,7 @@ Where:
* `time` (float) - indicates when this event happened, represented as the number
of seconds since the beginning of the recording session,
* `event-type` (string) - one of: `"o"`, `"i"`,
* `event-type` (string) - one of: `"o"`, `"i"`, `"b"`
* `event-data` (any) - event specific data, described separately for each event
type.
@@ -164,6 +165,18 @@ non-printable Unicode codepoints encoded as `\uXXXX`.
> implementations of asciicast-compatible terminal recorder should not capture
> it either unless explicitly permitted by the user.
#### "b" - breakpoint
Event of type `"b"` represents a playback breakpoint.
When breakpoint is encountered in the event stream and "pause on breakpoint"
functionality of the player is enabled, the playback should pause, and wait for
the user to resume.
`event-data` can be used to annotate (comment) a breakpoint. Annotations may be
used to show a list of "chapters" (players that load whole recording into
memory only).
## Notes on compatibility
Version 2 of asciicast file format solves several problems which couldn't be