added initial support for server-side record and playback using socket.io