Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update VideoPlayer.Source examples in docs to use remote image #876

Merged
merged 3 commits into from
Jan 10, 2025
Merged
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
32 changes: 22 additions & 10 deletions apps/docs/content/components/VideoPlayer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {VideoPlayer} from '@primer/react-brand'

```jsx live
<VideoPlayer title="GitHub media player">
<VideoPlayer.Source src="/brand/assets/example.mp4" />
<VideoPlayer.Source src="https://primer.github.io/brand/assets/example.mp4" />
<VideoPlayer.Track src="/brand/assets/example.vtt" default />
</VideoPlayer>
```
Expand All @@ -29,7 +29,7 @@ import {VideoPlayer} from '@primer/react-brand'
poster="/brand/assets/example-poster.png"
title="GitHub media player"
>
<VideoPlayer.Source src="/brand/assets/example.mp4" />
<VideoPlayer.Source src="https://primer.github.io/brand/assets/example.mp4" />
<VideoPlayer.Track src="/brand/assets/example.vtt" default />
</VideoPlayer>
```
Expand All @@ -38,7 +38,7 @@ import {VideoPlayer} from '@primer/react-brand'

```jsx live
<VideoPlayer showBranding={false} title="GitHub media player">
<VideoPlayer.Source src="/brand/assets/example.mp4" />
<VideoPlayer.Source src="https://primer.github.io/brand/assets/example.mp4" />
<VideoPlayer.Track src="/brand/assets/example.vtt" default />
</VideoPlayer>
```
Expand All @@ -47,7 +47,7 @@ import {VideoPlayer} from '@primer/react-brand'

```jsx live
<VideoPlayer visuallyHiddenTitle title="GitHub media player">
<VideoPlayer.Source src="/brand/assets/example.mp4" />
<VideoPlayer.Source src="https://primer.github.io/brand/assets/example.mp4" />
<VideoPlayer.Track src="/brand/assets/example.vtt" default />
</VideoPlayer>
```
Expand All @@ -64,7 +64,10 @@ import {VideoPlayer} from '@primer/react-brand'
showVolumeControl={false}
showFullScreenButton={false}
>
<VideoPlayer.Source src="/brand/assets/example.mp4" type="video/mp4" />
<VideoPlayer.Source
src="https://primer.github.io/brand/assets/example.mp4"
type="video/mp4"
/>
<VideoPlayer.Track src="/brand/assets/example.vtt" default />
</VideoPlayer>
```
Expand All @@ -73,7 +76,10 @@ import {VideoPlayer} from '@primer/react-brand'

```jsx live
<VideoPlayer title="GitHub media player" showControlsWhenPaused={false}>
<VideoPlayer.Source src="/brand/assets/example.mp4" type="video/mp4" />
<VideoPlayer.Source
src="https://primer.github.io/brand/assets/example.mp4"
type="video/mp4"
/>
<VideoPlayer.Track src="/brand/assets/example.vtt" default />
</VideoPlayer>
```
Expand All @@ -87,7 +93,10 @@ import {VideoPlayer} from '@primer/react-brand'
showBranding={false}
showControlsWhenPaused={false}
>
<VideoPlayer.Source src="/brand/assets/example.mp4" type="video/mp4" />
<VideoPlayer.Source
src="https://primer.github.io/brand/assets/example.mp4"
type="video/mp4"
/>
<VideoPlayer.Track src="/brand/assets/example.vtt" default />
</VideoPlayer>
```
Expand All @@ -99,7 +108,10 @@ import {VideoPlayer} from '@primer/react-brand'
title="GitHub media player"
playIcon={() => <PlayIcon size={96} />}
>
<VideoPlayer.Source src="/brand/assets/example.mp4" type="video/mp4" />
<VideoPlayer.Source
src="https://primer.github.io/brand/assets/example.mp4"
type="video/mp4"
/>
<VideoPlayer.Track src="/brand/assets/example.vtt" default />
</VideoPlayer>
```
Expand All @@ -111,7 +123,7 @@ The `VideoPlayer` component exposes a `useVideo` hook that can be used to contro
Full documentation for the `useVideo` hook can be found [below](#usevideo-context).

```tsx live
() => {
;() => {
const MyVideoPlayer = () => {
const {isPlaying, togglePlaying, seek} = useVideo()

Expand All @@ -127,7 +139,7 @@ Full documentation for the `useVideo` hook can be found [below](#usevideo-contex
showFullScreenButton={false}
>
<VideoPlayer.Source
src="/brand/assets/example.mp4"
src="https://primer.github.io/brand/assets/example.mp4"
type="video/mp4"
/>
<VideoPlayer.Track src="/brand/assets/example.vtt" default />
Expand Down
Loading