diff --git a/app/views/asciicasts/show.js.erb b/app/views/asciicasts/show.js.erb
index 527ab17..9d43921 100644
--- a/app/views/asciicasts/show.js.erb
+++ b/app/views/asciicasts/show.js.erb
@@ -29,6 +29,10 @@
if (speed) {
params += '&speed=' + speed;
}
+ var autoplay = script.getAttribute('data-autoplay');
+ if (autoplay === '1') {
+ params += '&autoplay=' + autoplay;
+ }
return params;
}
diff --git a/app/views/docs/embedding.html.slim b/app/views/docs/embedding.html.slim
index e01f274..290a381 100644
--- a/app/views/docs/embedding.html.slim
+++ b/app/views/docs/embedding.html.slim
@@ -52,3 +52,15 @@ markdown:
For example, to make the font big the script should look like this:
+
+ ### 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:
+
+