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

Reformat YouTube videos to the embeded URL #10372

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

Conversation

hultqvist
Copy link

Extract the YouTube video or list ID and generates the embed URL.
Simplifies embedding YouTube videos by allowing one to copy paste the direct YouTube URL rather than extracting the embed URL from the <iframe> source.
Supports short youtu.be links.

Add "rel=0" (unless explicitly specified) to only show related videos from the same channel.

@hultqvist
Copy link
Author

@dotnet-policy-service agree

Copy link
Contributor

@yufeih yufeih left a comment

Choose a reason for hiding this comment

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

Thank you @hultqvist

@yufeih yufeih added the new-feature Makes the pull request to appear in "New Features" section of the next release note label Nov 11, 2024
@yufeih
Copy link
Contributor

yufeih commented Nov 11, 2024

@hultqvist Could you also update the failed QuoteSectionNoteTest?

@hultqvist
Copy link
Author

Done, fixed so that rel=0 is only added on identified YouTube links, fixes one test.
Updated other tests.

Now I also changed the "http" to "https" replacement and included a test for links containing the word "http" in other locations.

Extract the YouTube video or list ID and generates the embed URL.
Simplifies embedding YouTube videos by allowing one to copy paste the direct YouTube URL rather than extracting the embed URL from the <iframe> source.
Also supports short youtu.be links.

Add "rel=0" (unless explicitly specified) to only show related videos from the same channel.
Add test for link with rel=1

Fix https enforcer to only replace at start of link.
Add test for http replacement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Makes the pull request to appear in "New Features" section of the next release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants