dtinth / ttycast

Broadcast your tty to the world! Stream your live terminal session online. Powered by ttyrec, tty.js and Socket.IO
http://me.dt.in.th/page/ttycast
MIT License
429 stars 23 forks source link

[wishlist] support for replay-on-connect #2

Closed macmenot closed 11 years ago

macmenot commented 11 years ago

would it be possible for ttycast to automatically call ttyplay when a user connects, so that the playbacks starts from frame 0 each time, rather than being "live live"?

i.e.,

$ ttycast /tmp/ttycast
   info  - socket.io started
   info  - waiting for connection...
   info  - handshake authorized eOGCipmDChoePr6Zz4J6
   info  - ttyplay /tmp/ttycast --> client 1
(time passes)
   info  - handshake authorized 850PgS73TDk7xy_80fKs
   info  - ttyplay /tmp/ttycast --> client 2

if a client disconnected, ttycast would killoff the forked ttyplay process

dtinth commented 11 years ago

Well, ttycast is designed to be for live broadcasting... It's not a problem that this application aims to fix. Sorry.

Note that /tmp/ttycast is a FIFO pipe, it can't be read over and over again.

If you want to put a whole terminal recording session online, then maybe you can use ttyrec to record the terminal and save it to a file.

It may be possible to implement ttyplay in pure JavaScript and use it with tty.js.