Asciinema Player for Ember.
- Ember.js v4 or above
- Ember CLI v4 or above
- Node.js v14 or above
ember install ember-asciinema-player
Add the player component to a template:
Pass supported options as component arguments:
autoPlay,
loop,
startAt,
speed,
idleTimeLimit,
theme,
poster,
fit,
controls,
markers,
pauseOnMarkers. Learn more about these options in
the asciinema-player docs.
This example assumes that @asciicastData is a preloaded asciicast file.
Asciicast may be fetched from a remote source. For example, to preload
asciicast in a route:
async model() {
const response = await fetch('/example.cast');
const asciicast = await response.text();
return asciicast;
}Example asciicast for development purposes may be found at
asciinema.org/explore. To use the example
asciicast file from this project, copy tests/dummy/public/example.cast to your
own Ember project's public/ folder and fetch it,
e.g. const response = await fetch('/example.cast');.