Skip to content

3.11.0

Choose a tag to compare

@github-actions github-actions released this 03 Oct 17:53
· 101 commits to develop since this release

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:

asciicast