Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/smart-wolves-pause.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react-brand': patch
---

Removed the non-functional `VideoPlayer` `showControlsWhenPaused` prop from the public API and documentation.
40 changes: 15 additions & 25 deletions apps/next-docs/content/components/VideoPlayer/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,10 @@ The audio description can be provided as part of the existing soundtrack, or via
</VideoPlayer>
```

## Hide controls when paused

```jsx live
<VideoPlayer title="GitHub media player" showControlsWhenPaused={false}>
<VideoPlayer.Source src="/example.mp4" type="video/mp4" />
<VideoPlayer.Track src="/example.vtt" default />
</VideoPlayer>
```

## Minimal

```jsx live
<VideoPlayer title="GitHub media player" visuallyHiddenTitle showBranding={false} showControlsWhenPaused={false}>
<VideoPlayer title="GitHub media player" visuallyHiddenTitle showBranding={false}>
<VideoPlayer.Source src="/example.mp4" type="video/mp4" />
<VideoPlayer.Track src="/example.vtt" default />
</VideoPlayer>
Expand Down Expand Up @@ -200,21 +191,20 @@ Below is a detailed description of each property and method available in the `us

`VideoPlayer` provides a React alternative to the native HTML `<video />`.

| Name | Type | Default | Required | Description |
| :----------------------- | :------------------------------------- | :-----: | :------: | :-------------------------------------------------------------- |
| `children` | `React.ReactNode`, `React.ReactNode[]` | | `true` | Takes `<VideoPlayer.Source>` and `<VideoPlayer.Track>` elements |
| `title` | `string` | | `true` | Sets the title of the video |
| `visuallyHiddenTitle` | `boolean` | | `false` | Visually hides the title of the video in the upper-left corner |
| `showBranding` | `boolean` | `true` | `false` | Displays GitHub branding next to video title |
| `poster` | `string` | | `false` | Sets an image as the starting frame for the video element |
| `className` | `string` | | `false` | Sets a custom class on the `<video>` element |
| `showControlsWhenPaused` | `boolean` | `true` | `false` | Show the video controls when paused |
| `showPlayPauseButton` | `boolean` | `true` | `false` | Show the play button control |
| `showSeekControl` | `boolean` | `true` | `false` | Show the seek control |
| `showCCButton` | `boolean` | `true` | `false` | Show the closed caption toggle control |
| `showMuteButton` | `boolean` | `true` | `false` | Show the mute button control |
| `showVolumeControl` | `boolean` | `true` | `false` | Show the volume control |
| `showFullScreenButton` | `boolean` | `true` | `false` | Show the full screen button control |
| Name | Type | Default | Required | Description |
| :--------------------- | :------------------------------------- | :-----: | :------: | :-------------------------------------------------------------- |
| `children` | `React.ReactNode`, `React.ReactNode[]` | | `true` | Takes `<VideoPlayer.Source>` and `<VideoPlayer.Track>` elements |
| `title` | `string` | | `true` | Sets the title of the video |
| `visuallyHiddenTitle` | `boolean` | | `false` | Visually hides the title of the video in the upper-left corner |
| `showBranding` | `boolean` | `true` | `false` | Displays GitHub branding next to video title |
| `poster` | `string` | | `false` | Sets an image as the starting frame for the video element |
| `className` | `string` | | `false` | Sets a custom class on the `<video>` element |
| `showPlayPauseButton` | `boolean` | `true` | `false` | Show the play button control |
| `showSeekControl` | `boolean` | `true` | `false` | Show the seek control |
| `showCCButton` | `boolean` | `true` | `false` | Show the closed caption toggle control |
| `showMuteButton` | `boolean` | `true` | `false` | Show the mute button control |
| `showVolumeControl` | `boolean` | `true` | `false` | Show the volume control |
| `showFullScreenButton` | `boolean` | `true` | `false` | Show the full screen button control |

The component API supports all standard HTML attribute props, while providing some additional behavior as described above.

Expand Down
Loading