Initial AD port

This commit is contained in:
2021-04-26 18:26:42 +01:00
parent 6911ce346b
commit 7e7773258a
408 changed files with 17799 additions and 172 deletions

View File

@@ -0,0 +1,44 @@
+++
title = "Video"
description = "Lazy-load videos and control playback options."
categories = ["experience"]
tags = []
html_attributes = ["class", "autoplay", "controls", "crossorigin", "height", "loop", "muted", "preload", "intrinsicsize", "poster", "src", "width", "playsinline"]
custom_attributes = []
snippets_used = []
[[copyright]]
owner = "Josh Habdas"
date = "2019"
license = "agpl-3.0-or-later"
+++
Basic usage:
```html
{{</* video autoplay="true" loop="true" src="assets/sample.mp4" */>}}
```
{{< video autoplay="true" loop="true" src="assets/sample.mp4" >}}
Assumes the following directory structure:
```
├── assets
├── content
│   └── videos
│   └── gifs
│   ├── assets
│   │ └── sample.mp4
│   └── index.md
├── content
```
With controls:
```html
{{</* video controls="true" src="assets/sample.mp4" */>}}
```
{{< video controls="true" src="assets/sample.mp4" >}}
Absolute `src` and `poster` URLs also possible. Absolute URLs must include a scheme such as `http` or `https`. Root-relative URLs not currently possible.