Add replay recording functionality.