atoms
Video
A video element with deferred loading, so a hidden background video doesn't fetch until the page chooses to start it.
Specimens
{{ Video.render({
classes: "w-full",
muted: true,
loop: true,
playsInline: true
}) }}{{ Video.render({ defer: false, classes: "w-full" }) }}Params
| Param | Type | Description |
|---|---|---|
src | string | Video URL. Defaults to a sizzle video hosted on imgur. |
poster | string | Poster image URL. Empty by default. |
preload | string | preload attribute. Defaults to none. |
autoplay | boolean | Adds autoplay. Defaults to false. |
loop | boolean | Adds loop. Defaults to false. |
muted | boolean | Adds muted. Defaults to false. |
playsInline | boolean | Adds playsinline. Defaults to false. |
defer | boolean | Defaults to true. When true, the source goes in data-src with data-defer-video (loaded by js/preloader/deferred-videos.js) instead of src. |
classes | string | Appended as-is to the <video>. No classes filter. |
style | string | Inline style on the <video>. |