Add autoplay and loop to video shortcode.

This commit is contained in:
Fredrik Jonsson 2021-05-24 19:05:40 +02:00
commit 17c2d804b1

View file

@ -1,5 +1,5 @@
<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
<video controls preload="{{ .Get "preload" | default "metadata" }}" {{ with .Get "width" }}width="{{ . }}"{{ end }}>
<video controls preload="{{ .Get "preload" | default "metadata" }}" {{ with .Get "width" }}width="{{ . }}"{{ end }} {{ with .Get "autoplay" }}autoplay="{{ . }}"{{ end }} {{ with .Get "loop" }}loop="{{ . }}"{{ end }}>
{{ with .Get "src" }}<source src="{{ . | relURL }}" type="video/mp4">{{ end }}
</video>
{{ with .Get "caption" }}<figcaption>{{ . }}</figcaption>{{ end }}