You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add shared Video component for YouTube embeds (#5136)
Replaces hand-rolled YouTube iframes with a click-to-play facade that
defers loading until clicked, uses the youtube-nocookie.com domain, and
enforces a consistent centered/max-width appearance. Migrates the 5
single-video embeds; playlist embeds and the local mp4 in
design-patterns/approval.mdx are left as-is.
Copy file name to clipboardExpand all lines: docs/evaluate/why-temporal.mdx
+3-8Lines changed: 3 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,8 @@ tags:
13
13
- Durable Execution
14
14
---
15
15
16
+
import { Video } from'@site/src/components';
17
+
16
18
# Why Temporal?
17
19
18
20
Temporal solves many problems that developers face while building distributed applications.
@@ -27,14 +29,7 @@ You can check out a list of [use cases for Temporal](/evaluate/use-cases-design-
27
29
:::tip See Temporal in action
28
30
Watch the following video to see how Temporal ensures an order-fulfillment system can recover from various failures, from process crashes to unreachable APIs.
@@ -251,6 +252,26 @@ One click will zoom out, another will zoom back.
251
252
Most rendering will allow readers to pull the image around to view all parts of the image.
252
253
On non-mobile systems, cursors will change to interactive elements when hovered above zoomable items to indicate interaction.
253
254
255
+
## Using Video
256
+
257
+
Video embeds a YouTube video behind a click-to-play facade. It enforces a consistent, centered, width-constrained appearance across the site, always points at the `youtube-nocookie.com` embed domain, and defers loading the real iframe (and YouTube's tracking scripts) until the reader clicks the thumbnail.
258
+
259
+
Usage:
260
+
261
+
```
262
+
<Video videoId="EwweiH2rd7M" title="What is the Temporal Platform?" />
263
+
```
264
+
265
+
| Prop | Type | Required | Description |
266
+
| --- | --- | --- | --- |
267
+
|`videoId`|`string`| Yes | The YouTube video ID (the `v=` value from a `youtube.com/watch` URL). |
268
+
|`title`|`string`| Yes | A descriptive title. Used as the iframe's accessible title, the play button's `aria-label`, and the "Watch" link generated for the LLM Markdown pipeline (see [MARKDOWN_PIPELINE.md](./MARKDOWN_PIPELINE.md)). |
269
+
|`maxWidth`|`string`| No | Escape hatch to override the default width for a documented one-off exception. Most pages should omit this and use the standard width. |
270
+
271
+
Because `Video` generates the "Watch: {title}" link for the LLM Markdown feed automatically, you no longer need to hand-write a separate `Watch [Title](url)` sentence purely for that purpose. You can still add a short lead-in sentence for human readers (for example, "Watch a short overview:") above the component.
272
+
273
+
**Not yet supported:** embedding a YouTube playlist (`videoseries?list=...`). The two pages that still embed a playlist ([`docs/develop/python/workflows/versioning.mdx`](../docs/develop/python/workflows/versioning.mdx) and [`docs/develop/dotnet/workflows/versioning.mdx`](../docs/develop/dotnet/workflows/versioning.mdx)) continue to use a raw `<iframe>` until playlist support is added.
274
+
254
275
## Using DocsTable
255
276
256
277
In certain rare instances, standard Markdown tables won't work for our needs.
0 commit comments