Self-hosting Published on 06 Jan 2016 by Marcin Kulik
I’m very happy to announce version 2.0 of the asciinema web player. There are several exciting aspects of this release so let’s get straight to the point.
First, the new player directly supports asciicast v1 format. In other words, there is no need to pre-process the recording upfront, before passing it to the player. This is possible thanks to built-in terminal emulator based on Paul Williams’ parser for ANSI-compatible video terminals. It covers only the display part of the emulation, as this is what the player is all about (input is handled by your terminal+shell at the time of recording anyway). Handling of escape sequences is fully compatible with most modern terminal emulators like xterm, Gnome Terminal, iTerm, mosh etc.
This is cool in itself, but the best part of it is that it enables self-hosting
of the recordings on your own website, without depending on
asciinema.org. If you’re not comfortable keeping your
recordings on asciinema.org (“in the cloud” == “other people’s computers”), or
you simply prefer to own and fully control your content, this release solves
this problem for you. Just place player’s
.css files together with
.json file of your recording in your web assets directory, and insert short
<script> tag in your HTML. Take a look at
README for quick start.
Check asciinema/asciinema-player on Github for API documentation and usage examples.