Skip to content

Commit 45d770b

Browse files
committed
Update 22-videos.qmd
1 parent 33c6aac commit 45d770b

1 file changed

Lines changed: 36 additions & 16 deletions

File tree

user_guide/22-videos.qmd

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ versions: ">=0.3"
88

99
# Videos
1010

11-
Videos can make tutorials, demos, and explainers far more effective than screenshots alone. Great Docs supports YouTube, Vimeo, and local video files with responsive layouts, lazy loading, and accessibility features built in.
11+
Videos can make tutorials, demos, and explainers far more effective than screenshots alone. Great
12+
Docs supports YouTube, Vimeo, and local video files with responsive layouts, lazy loading, and
13+
accessibility features built in.
1214

1315
## YouTube
1416

15-
Use the following syntax to embed a YouTube video. You can use the regular watch URL, the short URL, or the embed URL (all three work):
17+
Use the following syntax to embed a YouTube video. You can use the regular watch URL, the short URL,
18+
or the embed URL (all three work):
1619

1720
```{shortcodes="false"}
1821
{{< video https://www.youtube.com/watch?v=wo9vZccmqwc >}}
@@ -22,7 +25,8 @@ Use the following syntax to embed a YouTube video. You can use the regular watch
2225
{{< video https://www.youtube.com/embed/wo9vZccmqwc >}}
2326
```
2427

25-
All three produce the same result. The video is responsive by default and it scales to fill the available width while maintaining a 16:9 aspect ratio.
28+
All three produce the same result. The video is responsive by default and it scales to fill the
29+
available width while maintaining a 16:9 aspect ratio.
2630

2731
Here's a live example:
2832

@@ -31,7 +35,8 @@ Here's a live example:
3135
::: {.callout-tip}
3236
## YouTube Controls
3337

34-
YouTube embeds use the standard YouTube player, giving visitors full access to native controls including ad skipping, captions, playback speed, and quality settings.
38+
YouTube embeds use the standard YouTube player, giving visitors full access to native controls
39+
including ad skipping, captions, playback speed, and quality settings.
3540
:::
3641

3742
### Start Time
@@ -61,17 +66,20 @@ Vimeo videos work the same way:
6166
{{< video https://vimeo.com/548291297 >}}
6267
```
6368

64-
Vimeo embeds are lazy-loaded automatically: the iframe content is deferred until the video scrolls near the viewport.
69+
Vimeo embeds are lazy-loaded automatically: the iframe content is deferred until the video scrolls
70+
near the viewport.
6571

6672
## Local Video Files
6773

68-
To embed a video file stored alongside your documentation (e.g., a short screen recording), place the file in your project and reference it directly:
74+
To embed a video file stored alongside your documentation (e.g., a short screen recording), place
75+
the file in your project and reference it directly:
6976

7077
```{shortcodes="false"}
7178
{{< video demo.mp4 >}}
7279
```
7380

74-
Local videos are rendered as HTML5 `<video>` elements. To host them alongside your `.qmd` files, place them in the `assets/` directory:
81+
Local videos are rendered as HTML5 `<video>` elements. To host them alongside your `.qmd` files,
82+
place them in the `assets/` directory:
7583

7684
```
7785
user_guide/
@@ -87,7 +95,8 @@ Then reference from the `.qmd` file:
8795
```
8896

8997
::: {.callout-note}
90-
Keep video files small. Git repositories aren't ideal for large binary files. For longer recordings, consider uploading to YouTube or Vimeo and embedding from there.
98+
Keep video files small. Git repositories aren't ideal for large binary files. For longer recordings,
99+
consider uploading to YouTube or Vimeo and embedding from there.
91100
:::
92101

93102
## Aspect Ratio
@@ -124,11 +133,13 @@ A short tour of the CERN facility.
124133
See @fig-demo for the full walkthrough.
125134
```
126135

127-
This assigns the video a figure number and caption, and `@fig-demo` creates a clickable cross-reference elsewhere on the page.
136+
This assigns the video a figure number and caption, and `@fig-demo` creates a clickable
137+
cross-reference elsewhere on the page.
128138

129139
## Loom
130140

131-
Loom videos aren't recognized by the video syntax directly. Instead, use the Loom embed URL in a raw HTML `<iframe>`:
141+
Loom videos aren't recognized by the video syntax directly. Instead, use the Loom embed URL in a raw
142+
HTML `<iframe>`:
132143

133144
```html
134145
<div class="quarto-video ratio ratio-16x9">
@@ -140,18 +151,27 @@ Loom videos aren't recognized by the video syntax directly. Instead, use the Loo
140151
</div>
141152
```
142153

143-
Replace `YOUR_VIDEO_ID` with the ID from your Loom share link (e.g., if the share link is `https://www.loom.com/share/abc123`, the ID is `abc123`). The `quarto-video ratio ratio-16x9` classes give it the same responsive container as other videos, and Great Docs will lazy-load the iframe automatically.
154+
Replace `YOUR_VIDEO_ID` with the ID from your Loom share link (e.g., if the share link is
155+
`https://www.loom.com/share/abc123`, the ID is `abc123`). The `quarto-video ratio ratio-16x9`
156+
classes give it the same responsive container as other videos, and Great Docs will lazy-load the
157+
iframe automatically.
144158

145159
## Tips
146160

147-
- **Ads**: YouTube may show ads on monetized videos, even in embeds. To guarantee an ad-free experience, upload to a channel you control with monetization disabled.
148-
- **Privacy**: Consider using `youtube-nocookie.com` embed URLs (e.g., `https://www.youtube-nocookie.com/embed/VIDEO_ID`) to reduce tracking.
149-
- **Multiple videos**: The thumbnail placeholder optimization means pages with many YouTube embeds still load quickly (only the thumbnails are fetched initially).
161+
- **Ads**: YouTube may show ads on monetized videos, even in embeds. To guarantee an ad-free
162+
experience, upload to a channel you control with monetization disabled.
163+
- **Privacy**: Consider using `youtube-nocookie.com` embed URLs (e.g.,
164+
`https://www.youtube-nocookie.com/embed/VIDEO_ID`) to reduce tracking.
165+
- **Multiple videos**: The thumbnail placeholder optimization means pages with many YouTube embeds
166+
still load quickly (only the thumbnails are fetched initially).
150167

151168
## Next Steps
152169

153-
Embedded videos bring tutorials, demos, and walkthroughs to life without leaving the documentation site. Great Docs lazy-loads all video embeds for fast page loads, regardless of how many videos appear on a page.
170+
Embedded videos bring tutorials, demos, and walkthroughs to life without leaving the documentation
171+
site. Great Docs lazy-loads all video embeds for fast page loads, regardless of how many videos
172+
appear on a page.
154173

155174
- [Diagrams](diagrams.qmd) covers Mermaid diagrams for visualizing architecture and workflows
156-
- [Authoring QMD Files](authoring-qmd-files.qmd) covers other rich content like callouts, tabsets, and code blocks
175+
- [Authoring QMD Files](authoring-qmd-files.qmd) covers other rich content like callouts, tabsets,
176+
and code blocks
157177
- [Theming & Appearance](theming.qmd) explains how video containers adapt to your site's styling

0 commit comments

Comments
 (0)