Unverified Commit 24b7175d authored by Spencer Zeng's avatar Spencer Zeng Committed by GitHub

Correct format for autoplay attribute in NextJS video docs (#62695)

### What?
Updates the format of the `autoplay` attribute in the [videos
documentation](https://nextjs.org/docs/app/building-your-application/optimizing/videos#common-video-tag-attributes)
to camel case, which is the correct format for the attribute in JSX,
matching the format of `playsInline`.
Co-authored-by: 's avatarSam Ko <sam@vercel.com>
parent ecec67d3
...@@ -39,13 +39,13 @@ export function Video() { ...@@ -39,13 +39,13 @@ export function Video() {
| `width` | Sets the width of the video player. | `<video width="320" />` | | `width` | Sets the width of the video player. | `<video width="320" />` |
| `height` | Sets the height of the video player. | `<video height="240" />` | | `height` | Sets the height of the video player. | `<video height="240" />` |
| `controls` | If present, it displays the default set of playback controls. | `<video controls />` | | `controls` | If present, it displays the default set of playback controls. | `<video controls />` |
| `autoplay` | Automatically starts playing the video when the page loads. Note: Autoplay policies vary across browsers. | `<video autoplay />` | | `autoPlay` | Automatically starts playing the video when the page loads. Note: Autoplay policies vary across browsers. | `<video autoPlay />` |
| `loop` | Loops the video playback. | `<video loop />` | | `loop` | Loops the video playback. | `<video loop />` |
| `muted` | Mutes the audio by default. Often used with `autoplay`. | `<video muted />` | | `muted` | Mutes the audio by default. Often used with `autoPlay`. | `<video muted />` |
| `preload` | Specifies how the video is preloaded. Values: `none`, `metadata`, `auto`. | `<video preload="none" />` | | `preload` | Specifies how the video is preloaded. Values: `none`, `metadata`, `auto`. | `<video preload="none" />` |
| `playsInline` | Enables inline playback on iOS devices, often necessary for autoplay to work on iOS Safari. | `<video playsInline />` | | `playsInline` | Enables inline playback on iOS devices, often necessary for autoplay to work on iOS Safari. | `<video playsInline />` |
> **Good to know**: When using the `autoplay` attribute, it is important to also include the `muted` attribute to ensure the video plays automatically in most browsers and the `playsInline` attribute for compatibility with iOS devices. > **Good to know**: When using the `autoPlay` attribute, it is important to also include the `muted` attribute to ensure the video plays automatically in most browsers and the `playsInline` attribute for compatibility with iOS devices.
For a comprehensive list of video attributes, refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attributes). For a comprehensive list of video attributes, refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attributes).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment