Skip to content

Commit bb28e73

Browse files
docs: add Safari compatibility warnings for embed component
- Add warning to embed component page about Safari compatibility issues - Recommend using <video> component instead for embedding videos - Update markdown content page with same Safari warning - Emphasize better cross-browser support with <video> component Co-Authored-By: Colton Berry <[email protected]>
1 parent ea762c3 commit bb28e73

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

fern/products/docs/pages/component-library/default-components/embed.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Fern also implements a custom component for embedding downloadable assets:
1212

1313
- `<Download src="..." />` - read more about it [below](#downloadable-assets).
1414

15+
<Warning>
16+
The `<embed>` component is not well-supported on Safari and may cause compatibility issues. For embedding videos, use the `<video>` component instead, which provides better cross-browser support and more control over playback.
17+
</Warning>
18+
1519
## Properties
1620

1721
<ParamField path="src" type="string" required={true}>
@@ -38,9 +42,9 @@ Fern also implements a custom component for embedding downloadable assets:
3842
<embed src="./growing-fern.mp4" type="video/mp4" style={{ aspectRatio: '16 / 9', width: '100%' }} />
3943
```
4044

41-
<Note>
42-
Videos with audio will automatically play when the page loads. If you want to prevent this behavior, consider using the [`<video>` component](/learn/docs/content/write-markdown#embedding-videos) instead, which provides more control over playback.
43-
</Note>
45+
<Warning>
46+
The `<embed>` component is not well-supported on Safari and may cause compatibility issues. For embedding videos, use the [`<video>` component](/learn/docs/content/write-markdown#embedding-videos) instead, which provides better cross-browser support and more control over playback. Additionally, videos with audio will automatically play when the page loads with `<embed>`.
47+
</Warning>
4448

4549
</Tab>
4650
<Tab title="Example using `<video>`">

fern/products/docs/pages/component-library/writing-content/markdown.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ For example, to embed a video, use the following Markdown:
120120

121121
<embed src="./embed-fern-waving.mp4" type="video/mp4" width="640px" height="360px" />
122122

123+
<Warning>
124+
The `<embed>` component is not well-supported on Safari and may cause compatibility issues. For embedding videos, use the `<video>` component instead (see below), which provides better cross-browser support and more control over playback.
125+
</Warning>
126+
123127
### Local videos
124128

125129
You can embed videos in your documentation using the HTML `<video>` tag. This gives you control over video playback settings like autoplay, looping, and muting.

0 commit comments

Comments
 (0)