Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Create archive of TowTruck sessions #57
My assumption is that we'd record things at the connection level, saving everything outgoing and incoming (along with timestamps of the messages). Then to replay we'd pick one channel (in or out, or both) and simply emit those messages at appropriate times. We'd probably mark the messages as being part of a replay, to let components change what they do based on that, but I don't have any ideas of what would be different right now, except perhaps we might change nicknames or other things slightly to show that it's a recording and not a live interaction.
In either case, the person replaying will get the experience of what a third person would have viewed. They won't see local clicks, etc. (Until perhaps we have a follow mode of some sort – but then it'll kind of fall out automatically once we implement those other features).
Doing it at a low level will mean that everything happens unless we stop it from happening, so I don't think we'd need to design much, just refine the result.
We'd want to start the recording with a fake "hello" message, to trigger initialization messages that we'd want in the recording.
Here's what I'm thinking for an initial implementation:
This adds a "virtual" participant, who is the recording agent. It sends the hello message, triggering all the normal responses, and says hello-back later as necessary. It is not however a full client. It creates its own channel to the hub, and all participants see it as a virtual participant. It never goes to any URLs, never does any actions, it just watches.
As messages come in it records them. It adds timestamps to all messages, but otherwise doesn't change them. For now maybe it stores the messages in a textarea and expects the user to copy the text out and into some destination. Ideally they get put in some location where they can be loaded using CORS.
A second command
This was referenced
Mar 11, 2013
added a commit
Mar 11, 2013
I couldn't help it, once I got to thinking about how to do it I had to try to do it. Now you can do
It should work somewhat intelligently across multiple pages. It'll play the first hello message from the new page, but then pause. When you start a playback it'll store your location in
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Hi Ian -- I'm a big Mozilla fan and longtime user of TogetherJS. I've used it for a number of academic projects, and I am beginning integrate it more heavily into my graduate research.
More recently, I've started playing with the
If you don't have the time to figure out why things might be going awry, can you direct me to a working example?