Skip to content

Commit 21c954b

Browse files
Remove non-functional VideoPlayer showControlsWhenPaused prop (#1388)
* Fix VideoPlayer showControlsWhenPaused prop * Update changeset * Deprecate prop * Trigger PR refresh Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove prop * Update changeset * cleanup --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 930ab18 commit 21c954b

2 files changed

Lines changed: 20 additions & 25 deletions

File tree

.changeset/smart-wolves-pause.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react-brand': patch
3+
---
4+
5+
Removed the non-functional `VideoPlayer` `showControlsWhenPaused` prop from the public API and documentation.

apps/next-docs/content/components/VideoPlayer/index.mdx

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,10 @@ The audio description can be provided as part of the existing soundtrack, or via
9090
</VideoPlayer>
9191
```
9292

93-
## Hide controls when paused
94-
95-
```jsx live
96-
<VideoPlayer title="GitHub media player" showControlsWhenPaused={false}>
97-
<VideoPlayer.Source src="/example.mp4" type="video/mp4" />
98-
<VideoPlayer.Track src="/example.vtt" default />
99-
</VideoPlayer>
100-
```
101-
10293
## Minimal
10394

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

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

203-
| Name | Type | Default | Required | Description |
204-
| :----------------------- | :------------------------------------- | :-----: | :------: | :-------------------------------------------------------------- |
205-
| `children` | `React.ReactNode`, `React.ReactNode[]` | | `true` | Takes `<VideoPlayer.Source>` and `<VideoPlayer.Track>` elements |
206-
| `title` | `string` | | `true` | Sets the title of the video |
207-
| `visuallyHiddenTitle` | `boolean` | | `false` | Visually hides the title of the video in the upper-left corner |
208-
| `showBranding` | `boolean` | `true` | `false` | Displays GitHub branding next to video title |
209-
| `poster` | `string` | | `false` | Sets an image as the starting frame for the video element |
210-
| `className` | `string` | | `false` | Sets a custom class on the `<video>` element |
211-
| `showControlsWhenPaused` | `boolean` | `true` | `false` | Show the video controls when paused |
212-
| `showPlayPauseButton` | `boolean` | `true` | `false` | Show the play button control |
213-
| `showSeekControl` | `boolean` | `true` | `false` | Show the seek control |
214-
| `showCCButton` | `boolean` | `true` | `false` | Show the closed caption toggle control |
215-
| `showMuteButton` | `boolean` | `true` | `false` | Show the mute button control |
216-
| `showVolumeControl` | `boolean` | `true` | `false` | Show the volume control |
217-
| `showFullScreenButton` | `boolean` | `true` | `false` | Show the full screen button control |
194+
| Name | Type | Default | Required | Description |
195+
| :--------------------- | :------------------------------------- | :-----: | :------: | :-------------------------------------------------------------- |
196+
| `children` | `React.ReactNode`, `React.ReactNode[]` | | `true` | Takes `<VideoPlayer.Source>` and `<VideoPlayer.Track>` elements |
197+
| `title` | `string` | | `true` | Sets the title of the video |
198+
| `visuallyHiddenTitle` | `boolean` | | `false` | Visually hides the title of the video in the upper-left corner |
199+
| `showBranding` | `boolean` | `true` | `false` | Displays GitHub branding next to video title |
200+
| `poster` | `string` | | `false` | Sets an image as the starting frame for the video element |
201+
| `className` | `string` | | `false` | Sets a custom class on the `<video>` element |
202+
| `showPlayPauseButton` | `boolean` | `true` | `false` | Show the play button control |
203+
| `showSeekControl` | `boolean` | `true` | `false` | Show the seek control |
204+
| `showCCButton` | `boolean` | `true` | `false` | Show the closed caption toggle control |
205+
| `showMuteButton` | `boolean` | `true` | `false` | Show the mute button control |
206+
| `showVolumeControl` | `boolean` | `true` | `false` | Show the volume control |
207+
| `showFullScreenButton` | `boolean` | `true` | `false` | Show the full screen button control |
218208

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

0 commit comments

Comments
 (0)