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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joshfarrant
Copy link
Contributor

@joshfarrant joshfarrant commented Jan 3, 2025

Summary

The video examples in the docs aren't currently working. For some reason the .mp4 isn't being served, so there's no video to play.

This PR switches the src of the video to use the static version in the Primer Brand repo.

What should reviewers focus on?

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • UI Changes contain new visual snapshots (generated by adding update snapshots label to the PR)
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Copy link

changeset-bot bot commented Jan 3, 2025

⚠️ No Changeset found

Latest commit: 4432f8e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jan 3, 2025

🟢 No design token changes found

Copy link
Contributor

github-actions bot commented Jan 3, 2025

🟢 No visual differences found

Our visual comparison tests did not find any differences in the UI.

@joshfarrant joshfarrant changed the title update VideoPlayer.Source examples in docs to use remote image Update VideoPlayer.Source examples in docs to use remote image Jan 3, 2025
@joshfarrant joshfarrant marked this pull request as ready for review January 3, 2025 10:03
@joshfarrant joshfarrant requested a review from Copilot January 3, 2025 10:03

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • apps/docs/content/components/VideoPlayer.mdx: Language not supported

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@joshfarrant joshfarrant force-pushed the joshfarrant/videoplayer-fix-src branch from e55a6e4 to da89a1c Compare January 6, 2025 14:39
@@ -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://github.com/primer/brand/raw/refs/heads/main/apps/storybook/static/example.mp4" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In hindsight this feels a little risky for a number of reasons....

Could we instead link directly to the origin URL, which should fix the issue by not appending a trailing slash.

Suggested change
<VideoPlayer.Source src="https://github.com/primer/brand/raw/refs/heads/main/apps/storybook/static/example.mp4" />
<VideoPlayer.Source src="https://primer.github.io/brand/assets/example.mp4" />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh cool, hadn't realised an absolute URL would fix it. Great suggestion, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants