Releases: asciinema/asciinema-player
3.12.1
3.12.0
Notable changes:
- Live audio stream support for WebSocket sources (see below)
- Improved adaptive buffer algorithm for WebSocket sources (see below)
- Fixed keyboard shortcuts issue (stopped working) caused by the new mute/unmute icon
- Fixed seeking after playback ended (#282)
Live audio playback
The audioUrl
option, introduced in v3.11, can now also be used with live (WebSocket) sources:
AsciinemaPlayer.create("ws://example.com/ws/stream", document.getElementById("demo"), {
audioUrl: "http://example.com/icecast/stream.ogg"
});
The URL should be a live audio source - either a direct HTTP audio stream (.mp3, .aac, .ogg, etc) such as Icecast/Shoutcast endpoint, or HLS playlist (.m3u8).
Note that it's not recommended to use autoplay: true
option together with audioUrl
- browsers often require explicit user activity (click, tap) to enable sound, which in the player's case would be starting the playback by clicking on the play button. Without user click the autoplay
will start the playback but the sound likely won't be there.
Also, for the audio playback to work a server that handles the audio URL (e.g. Icecast) must be configured to allow CORS requests from the page (URL) that hosts the player.
New adaptive buffering
The WebSocket driver uses adaptive buffer (expressed in time) to ensure smooth, stutter free playback of live sessions with minimal latency.
The previous algorithm used a moving average over a sliding window of N recent latencies. It did ok-ish job, but given the sparse nature of the event stream (no constant rate) it turned out to be not ideal. Here's how it performed. Red dots are measured latencies, green line is effective buffer time:

The new algorithm uses time based EMA (exponential moving average), which is much more relevant for sparse events, resulting in more stable and overall lower buffer size when applied to a wide spectrum of terminal activities (here applied to the same input latencies as the one above):

3.11.1
This release brings additional fixes for audio loading in Safari.
3.11.0
Notable changes:
- Synced audio playback (see below)
- JS bundle size reduced by 43 KB (202 KB -> 159 KB) - it's now 78% of the previous release (v3.10) size
- WebSocket driver now uses jitter for exponential backoff calculation when reconnecting
- WebSocket driver can play live sessions encoded in asciicast v3 compatible format
- When loading of a recording takes 3s a loading animation is now shown - this may typically occur during initial buffering of the audio
- Fixed time position update when stepping through a recording with
,
and.
keys
The main new thing in this version is the synced audio playback.
When audioUrl
is passed as an option when mounting the player on the page, the player automatically creates hidden audio element, ensures the audio file is ready for playback, and syncs audio playback position with the terminal recording playback (pause, resume, seek just work).
AsciinemaPlayer.create("/demo.cast", document.getElementById("demo"), {
audioUrl: "https://example.com/voiceover.mp3"
});
There's also a new button (icon) and keyboard shortcut (m
key) for muting/unmuting.
Note that for the audio playback to work:
- a server that handles the audio URL must be configured to allow CORS requests from the page (URL) that hosts the player
- that server must support HTTP range requests
- you must not use
autoplay: true
option - browsers often require explicit user activity (click, tap) to enable sound
Check out this demo:
3.10.0
Notable changes:
- vastly improved wide character (CJK/emoji) support (this solves long standing set of issues: #270, #266, #199, #185)
- added preliminary support for the new asciicast v3 recording format
- added gruvbox-dark theme (thanks @hupfdule)
- increased cursor blink interval from 500ms to 600ms
- improved screen reader support (thanks @DataTriny)
- fixed terminal resizing during seek and step actions (thanks @gustavosbarreto)
- fixed crash when starting the playback while the player is still initializing
- fixed live stream handling when producer reconnects to the server
- various UI tweaks
3.10.0-rc.1
v3.10.0-rc.1 Bump version
3.9.1-rc.1
v3.9.1-rc.1 Bump version
3.9.0
Notable changes:
- keyboard shortcuts are now easily discoverable via help popup triggered with
?
key or the keyboard icon in the control bar - added "step back", triggered with
,
(comma) key, a complementary feature for existing "step forward" (.
key) - refactored websocket driver, and upgraded it for recent changes in ALiS protocol (uses WS subprotocol negotiation, supports both 8 and 16 color palettes, partially supports input and marker events, and more)
- player's core can now be run in a split mode, which greatly improves UI responsiveness in certain cases (see below)
https://www.npmjs.com/package/asciinema-player/v/3.9.0
The split mode, runs player's UI and player's core (parsing, terminal emulation) in separate OS threads, which improves UI's responsiveness during playback. In this setup the UI code runs in the window context, while the processing code runs in a WebWorker. The benefit of this configuration is typically observed only for high frame-rate / high bandwidth recordings. The player hosted on asciinema.org runs in the split mode. For typical demos/sessions it's not worth the setup hassle. This is advanced setup and in 99% of the cases you don't need it.
3.9.0-rc.2
v3.9.0-rc.2 Bump version
3.9.0-rc.1
v3.9.0-rc.1 Fix logging in worker