Add "autoplay" option to embedded player

openid
Marcin Kulik 11 years ago
parent edca76233d
commit 9e5a7c8d22

@ -29,6 +29,10 @@
if (speed) {
params += '&speed=' + speed;
}
var autoplay = script.getAttribute('data-autoplay');
if (autoplay === '1') {
params += '&autoplay=' + autoplay;
}
return params;
}

@ -52,3 +52,15 @@ markdown:
For example, to make the font big the script should look like this:
<script type="text/javascript" src="https://asciinema.org/a/14.js" id="asciicast-14" async data-size="big"></script>
### autoplay
The `autoplay` option allows for automatic playback start when the player
loads. Accepted values:
* 0 - do not start playback automatically (default)
* 1 - start playback automatically
For example, to make the asciicast auto play:
<script type="text/javascript" src="https://asciinema.org/a/14.js" id="asciicast-14" async data-autoplay="1"></script>

Loading…
Cancel
Save