-
-
Notifications
You must be signed in to change notification settings - Fork 792
allow other sources in Video block #6870
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
base: 18.x.x
Are you sure you want to change the base?
Conversation
…es. Added allowedPeertubeInstances to the video block config to add others
|
||
if (url) { | ||
if (url.match('youtu')) { | ||
if (url.match(/youtu.*?(list|live|\?v=|\.be\/|shorts)/)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also support www.youtube-nocookie.com
, which is the same as www.youtube.com
but is compliant with GDPR. See https://6.docs.plone.org/contributing/documentation/myst-reference.html#video-remote. It is currently not supported with this change. See https://regex101.com/r/8Op0g1/1.
I'd also like to support for YouTube privacy_mode=1
and for Vimeo dnt=1
GET parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The youtube-nocookie url is directly an embed. This should be a feature request: "Generate a youtube-nocookie embed url when adding a youtube video."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also support
www.youtube-nocookie.com
, which is the same aswww.youtube.com
but is compliant with GDPR. See https://6.docs.plone.org/contributing/documentation/myst-reference.html#video-remote. It is currently not supported with this change. See https://regex101.com/r/8Op0g1/1.I'd also like to support for YouTube
privacy_mode=1
and for Vimeodnt=1
GET parameters.
This block is to paste a URL copied from YouTube, not to paste the embed code that YouTube provides when you want to embed it in your site.
I mean, that the user will always paste the current URL of the YouTube video, they will never paste a www.youtube-nocookies.com URL.
An enhancement would be to generate the www.youtube-nocookies.com URL for any YouTube URL entered, but this is not the scope of this PR.
We just want to support additional video sources apart from the provided youtube and vimeo, like Peertube instances and YouTube shorts, which on their own have a URL.
} else if (url.match('shorts')) { | ||
videoID = url.match(/^.*\/shorts\/(.*)/)[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a case for embed
for both www.youtube.com
and www.youtube-nocookie.com
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not work that way. This would be a breaking change because we sould modify the use of https://react.semantic-ui.com/modules/embed/.
Caution
The Volto Team has suspended its review of new pull requests from first-time contributors until the release of Plone 7, which is preliminarily scheduled for the second quarter of 2026.
Read details.
If your pull request closes an open issue, include the exact text below, immediately followed by the issue number. When your pull request gets merged, then that issue will close automatically.
Closes #