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

(Showcase) Fallback to playing project video from URL #1342

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slashtechno
Copy link

@slashtechno slashtechno commented Aug 25, 2024

Currently, only YouTube videos are supported for the project demo.
This PR makes YoutubeRenderer fallback to playing from a URL if, for example, a link from #cdn or a raw GItHub link is set.

I wasn't sure how to test it as projects are pulled from Airtable, however.

Copy link

vercel bot commented Aug 25, 2024

@slashtechno is attempting to deploy a commit to the Hack Club Team on Vercel.

A member of the Team first needs to authorize it.


const isYouTubeLink = youtubeLink.includes('youtube.com') || youtubeLink.includes('youtu.be');
if (isYouTubeLink) {
const youtubeID = youtubeLink.split('v=')[1];
Copy link
Member

Choose a reason for hiding this comment

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

youtu.be links don't have v query param, thus no youtu.be links would render

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