We need to be able to control terminal I/O playback, when running tlog-play in a JavaScript terminal. The easiest and the most economical way to do that is to implement keyboard-driven control in tlog-play and then feed the JavaScript terminal with the control keys. Such as "space" for pause/play, cursor keys for fast-forward/rewind, etc.
Implement proof-of-concept of such a system. First, before tlog-play actually has any control, try to implement a set of on-screen buttons appearing beside the terminal. Let's say a "play/pause", a "rewind to start", a "fast forward" and, a "skip to end" button. Clicking those buttons should produce input characters for the program running in the terminal.
Test by running a shell under the terminal instead of tlog-play and checking if the characters that the buttons should generate appear on the command line.