Videos
Add a video with a Doks shortcode.
./layouts/shortcode/video.html
Usage
{{< video ratio="16x9" attributes="controls autoplay muted" webm-src="videos/flower.webm" mp4-src="videos/flower.mp4" >}}
Parameters | Values | |
---|---|---|
ratio | <1x1 | 4x3 | 16x9 | 21x9> | |
attributes | [Attributes] | |
webm-src | [path/to/file.webm] | |
mp4-src | [path/to/file.mp4] |
Renders
<div class="ratio ratio-16x9">
<video controls autoplay muted>
<source src="/videos/flower.webm" type="video/webm">
<source src="/videos/flower.mp4" type="video/mp4">
Sorry, your browser doesn't support embedded videos.
</video>
</div>